spring-boot-maven-plugin可以打包,服务也可以正常启动,但是无法排除相应的配置文件;

maven-jar-plugin也可以的打包,但是排除文件后层级目录不对,jar包无法启动,因此需要两者结合使用

true

src/main/resources

**/application*.yml

**/application*.yaml

**/application*.properties

true

src/main/resources

**/application.properties

**/application-${profiles.active}.properties

**/application.yml

**/application-${profiles.active}.yml

org.apache.maven.plugins

maven-compiler-plugin

${java.version}

${java.version}

UTF-8

org.springframework.boot

spring-boot-maven-plugin

2.1.2.RELEASE

org.apache.maven.plugins

maven-jar-plugin

2.4

*.yml

*.properties

org.apache.maven.plugins

maven-surefire-plugin

2.4.2

true

org.apache.maven.plugins

maven-resources-plugin

3.1.0

好文阅读

评论可见,请评论后查看内容,谢谢!!!评论后请刷新页面。