ARTICLE DETAIL

资讯详情

深耕网站建设、视觉设计与SEO优化的一线实战洞察。

springCloud打包时根目录配置和公共包打包配置 - br

springCloud打包时根目录配置和公共包打包配置 - br

当有公共模块打包时并不需要打包成springbootJar时需要跳过打包

<build><plugins><!-- 公共模块需要声明使用该插件,但将其跳过 --><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><skip>true</skip> <!-- 关键配置:跳过repackage --></configuration></plugin></plugins>
</build>

根项目的pom.xml配置为

<build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins>
</build>
返回列表