英文:
Spring Boot Mobile dependency not found
问题
我正在尝试使用 spring-boot-mobile 依赖项来检测用户是否使用移动平台(如果是的话,显示消息),但我遇到了这个错误:
依赖 'org.springframework.mobile:spring-mobile-device:1.1.5.RELEASE' 未找到
标签名称:groupId
描述:产生依赖项的项目组,例如 org.apache.maven。
版本:3.0.0+
<dependency>
<groupId>org.springframework.mobile</groupId>
<artifactId>spring-mobile-device</artifactId>
<version>1.1.5.RELEASE</version>
</dependency>
<repositories>
<repository>
<id>spring-repo</id>
<name>Spring Repository</name>
<url>http://repo.spring.io/release</url>
</repository>
<repository>
<id>spring-milestone</id>
<name>Spring Milestone Repository</name>
<url>http://repo.spring.io/milestone</url>
</repository>
<repository>
<id>spring-snapshot</id>
<name>Spring Snapshot Repository</name>
<url>http://repo.spring.io/snapshot</url>
</repository>
</repositories>
我正在使用 spring boot 2.3.0:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.0.RELEASE</version>
<relativePath/>
</parent>
我已经尝试过 mvn clean install -U,以及从 IntelliJ IDEA 进行的 clean install。
英文:
I'm trying to use the spring-boot-mobile dependency for detecting if the user uses mobile platform ( and if so, to display on message ), but I get this error:
Dependency 'org.springframework.mobile:spring-mobile-device:1.1.5.RELEASE' not found
Tag name: groupId Description : The project group that produced the dependency, e.g. org.apache.maven. Version : 3.0.0+
<dependency>
<groupId>org.springframework.mobile</groupId>
<artifactId>spring-mobile-device</artifactId>
<version>1.1.5.RELEASE</version>
</dependency>
<repositories>
<repository>
<id>spring-repo</id>
<name>Spring Repository</name>
<url>http://repo.spring.io/release</url>
</repository>
<repository>
<id>spring-milestone</id>
<name>Spring Milestone Repository</name>
<url>http://repo.spring.io/milestone</url>
</repository>
<repository>
<id>spring-snapshot</id>
<name>Spring Snapshot Repository</name>
<url>http://repo.spring.io/snapshot</url>
</repository>
</repositories>
I'm using spring boot 2.3.0:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.0.RELEASE</version>
<relativePath/>
</parent>
I already tried mvn clean install -U, and clean install from the intelij idea.
答案1
得分: 0
我通过下载 .jar 文件并将其添加到项目中解决了这个问题:
文件 -> 项目结构 -> 模块 -> 依赖项 -> +
现在它可以正常工作。
英文:
I solved this issue by downloading the .jar file and adding it in the project:
File -> Project Structure -> Modules -> Dependencies -> +
Now it works.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论