这是我第一个使用spring引导的项目。因此,我尝试使用父程序更新pom.xml,如下所示:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.in28minutes.springboot</groupId>
<artifactId>first-springboot-project</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>springboot-in-10-steps</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version> <!-- lookup parent from repository -->
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
</project>但是,我得到了一个错误:
项目构建错误: com.in28minutes.springboot:first-springboot-project:0.0.1-SNAPSHOT:的不可解析父POM无法在错误的本地POM中找到工件、org.springframework.boot:spring-boot-starter-parent:pom:2.0.0.BUILD-SNAPSHOT和“parent.relativePath”点。
任何帮助都行!

发布于 2018-10-26 14:31:04
没有像2.0.0-BUILD-SNAPSHOT这样的东西,您可能是直接从Spring项目复制的吗?
这里可以看到Spring的发布版本;
https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent
如果您想要最新版本,<version>2.0.6.RELEASE</version>将工作。
如果要使用快照或里程碑版本,请参阅文档。
它指定所需的repos。
发布于 2018-10-26 14:30:17
将2.0.0.BUILD-SNAPSHOT更改为2.0.0.RELEASE
https://stackoverflow.com/questions/53010860
复制相似问题