1,去掉springboot的maven插件
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
此插件会进行repackage
2, configuration下配置mainClass,指定程序入口
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.pn.pn_image.PnImageApplication</mainClass>
</configuration>
</plugin>