-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Description
因为我使用spring-boot-dependencies
代替了spring-boot-starter-parent
这个parent POM,解决方案见Spring Boot官方文档:
If you are not using the parent POM you can still use the plugin, however, you must additionally add an section:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.5.4.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
我考虑了下,还是使用spring-boot-starter-parent
比较好,提供了很多标准的配置,并且包含spring-boot-dependencies
。当然,这样的话你就不能继承你自己的parent POM了,不过一般中小型项目一般都没有自己的parent POM,所以应该没什么关系,真的需要修改为自己的parent POM的话,也很简单,删除spring-boot-starter-parent
改为spring-boot-dependencies
即可,详细说明见官方文档说明。
keepcleargas