在这里看看Spring Boot:
http://projects.spring.io/spring-boot/#quick-start
“快速入门”似乎包括:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.0.1.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
以下是我目前的存储库:
<repositories>
<repository>
<id>spring-milestones</id>
<url>http://repo.spring.io/milestone</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-milestones</id>
<url>http://repo.spring.io/milestone</url>
</pluginRepository>
</pluginRepositories>
我得到一个连接超时异常,当我真正查看存储库...
http://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-parent/
没有1.0.1! pom.xml应该包含一些其他存储库吗?
错误:
Project build error: Non-resolvable parent POM: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:1.0.0.RC5 from http://repo.spring.io/
milestone was cached in the local repository, resolution will not be reattempted until the update interval of spring-milestones has elapsed or updates are forced.
Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.0.0.RC5 from/to spring-milestones (http://repo.spring.io/
milestone): connection timed out to http://repo.spring.io/milestone/org/springframework/boot/spring-boot-starter-parent/1.0.0.RC5/spring-boot-starter-
parent-1.0.0.RC5.pom and 'parent.relativePath' points at wrong local POM
答案 0 :(得分:7)
中央存储库中的exists将以下内容添加到您的pom.xml
<project ...>
<repositories>
<repository>
<id>central</id>
<url>http://central.maven.org/maven2/</url>
</repository>
</repositories>
</project>