问题原因:因为 pom 集成了 boot-parent,打包时,在没有指定 mainClass 入口时,会找所有子模块下的 main 方法,除去 web 目录下有之外,其他模块下面均没有,导致打包异常。
在空包里面建一个类即可
![在这里插入图片描述](https://img-blog.csdnimg.cn/3c6f9d846d0d44d8b83f1e5d463b0f0d.png)
SpringBoot 打包异常:Unable to find main class
最新推荐文章于 2023-10-11 20:53:43 发布