方法1:查看Springboot启动类中是否有Application注解 方法2:修改pom文件中Spring-boot-maven-plugin加入<mainClass>Springboot启动类的路径</mainClass>