springcloud多模块打包出现引用错误的问题解决方法

问题展示:

   项目使用父子结构构件maven工程,在项目中有使用 common模块作为基础公共文件,被其他模块所依赖,当打包其他模块时候出现不能引用到类。

 

 

打包界面

 

 

 解决方法:

这是因为common模块的pom中存在 spring-boot-maven-plugin,当应用的模块打包时若也存在spring-boot-maven-plugin,的话会被重新打包,所以就导致了上面的问题,

我们将 common中的 spring-boot-maven-plugin注释即可。

posted @ 2020-04-28 09:21  大姚666  阅读(1249)  评论(0)    收藏  举报