SpringBoot項目用maven打成jar包,若是不有意配置,是不能做爲第三方依賴的,即別的項目不能引用它。若是想將其發佈爲第三方依賴,須要在其pom文件中作以下處理:html
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <executions> <execution> <goals> <goal>repackage</goal> </goals> <configuration> <classifier>exec</classifier> </configuration> </execution> </executions> </plugin> </plugins> </build>
參考來源:spring
http://blog.csdn.net/guduyishuai/article/details/60968728maven
https://stackoverflow.com/questions/40089443/how-to-add-a-dependency-to-a-spring-boot-jar-in-another-projectspring-boot
http://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/maven-plugin/examples/repackage-classifier.htmlui