现象
springboot 打包时遇到多个 main 无法正常打包
解决方法
指定主类
<!-- 打包插件 --><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><mainClass>com.ai.srd.modules.flowable.AiFlowFlowableApplication</mainClass></configuration></plugin>
推荐
之所有有多个主类,可能是有些临时单元测试代码,推荐把这部分代码写到 test 包里
参考资料
/qq_35606010/article/details/106187371