如果您使用Spring Boot进行应用程序,则忘记添加
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.7.RELEASE</version>
</parent>
可能导致此问题,以及缺少这些行
<repositories>
<repository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</pluginRepository>
</pluginRepositories>
如果你正在运行
mvn spring-boot:run
从命令行,确保你位于包含pom.xml文件的目录中。否则,你将在当前项目和插件组错误中遇到没有为前缀“ spring-boot”找到的插件。