增加以下pom.xml配置
<!--1.spring-boot插件-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<jvmArguments>
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
</jvmArguments>
</configuration>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>1.2.6.RELEASE</version>
</dependency>
</dependencies>
</plugin>
在工具栏中的Run -> Edit Configurations... -> Remote,
新建一个启动项,什么都不用改,但为了方便名字随便起一个你能区分开的就行,
我这里叫debug了