在pom.xml文件中添加如下:
<build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><configuration><mainClass>com.yincunyu.test.HelloTest</mainClass></configuration><executions><execution><goals><goal>repackage</goal></goals></execution></executions></plugin></plugins></build>
注意:
此处要改为自己主类的位置
<mainClass>com.yincunyu.test.HelloTest</mainClass>