当有公共模块打包时并不需要打包成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>