子模块使用 pom 打包方式即可解决
<packaging>pom</packaging>
如果还未能解决
在公共模块或者当前模块下加入打包工具
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <classifier>exec</classifier> </configuration> </plugin> </plugins> </build>