SpringBoot项目使用common模块问题(依赖包找不到?)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SpringBoot项目使用common模块问题(依赖包找不到?)相关的知识,希望对你有一定的参考价值。

参考技术A 类似上图项目结构
common模块打包出来的应该是不可执行的jar包,
因此不能在common的pom中定义spring-boot-maven-plugin插件,

SpringBoot多模块打包

参考技术A 最近写了个app想测试下之前写的服务端,打包时候发现问题,卡了一个小时,做下记录避免下次再卡;
坑1:
多模块中common 包需要install 那怎么install呢
因为一直都是用idea mvn的图形界面 不知道什么时候点了

结果一直在plugins 一直点install 一直安装不上

应该点的是Lifecycle 中的install

坑2:
多模块中父pom.xml不应该有build节点
需要打包的的模块中应该有相应的build节点
也就是下图

坑3:
父模块要install下

以上是关于SpringBoot项目使用common模块问题(依赖包找不到?)的主要内容,如果未能解决你的问题,请参考以下文章

【Springboot】项目模块化

SpringBoot之多模块项目

springboot获取getBean方法以及ApplicationContext空指针问题解决

SpringBoot+SpringCloud+vue+Element开发项目——业务功能实现

SpringBoot多模块打包

Springboot项目使用@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})失效的解决方案