解决方案是在pom.xml文件中为插件添加MODULE布局
<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <layout>MODULE</layout> </configuration> <executions> <execution> <goals> <goal>repackage</goal> </goals> </execution> </executions></plugin>



