好不容易写完的代码,发现打包错了
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
这个把包代码不要放在parent 的pom.xml中
因为子模块继承父模块,
又因为是spring boot项目,
so ,打包的时候,都会去找main
比如:你的common 子模块没有main启动类,
那么,他肯定就报错了~~~~~~
友情提示,打包的时候,把这个代码放到有启动类的那个模块里,然后在parent的pom中进行打包,就可以成功了。