在配置文件中增加:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>org.thingsboard.MqttTransportApplication</mainClass>
</configuration>
</plugin>
说明:<mainClass>org.thingsboard.MqttTransportApplication</mainClass>,是指向启动类.不增加这句会出现"Failed to execute goal org.springframework.boot:spring-boot-maven-plugin"这种错误.