spring-boot子模块打包去掉BOOT-INF文件夹


1、spring-boot maven打包,一般pom.xml文件里会加

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
</plugin>

这样打的jar里会多一个目录BOOT-INF。

 

2.引起问题,程序包不存在。

 

3.解决办法,如果A子模块包依赖了B子模块包,在B子模块的pom文件,加入

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
        <skip>true</skip>
    </configuration>
</plugin>

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM