公用依赖模块配置文件添加 <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>2.0.4.RELEASE</version> <configuration> <skip>true</skip> <!--不需要main类打包--> </configuration> </plugin> 修改完成之后,再次打包就没问题了