一、pom.xml配置
增加以下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>
二、添加一個remote
在工具欄中的Run -> Edit Configurations... -> Remote,
建立一個啟動項,什麼都不用改,但為了友善名字随便起一個你能區分開的就行,
我這裡叫debug了

三、以debug方式啟動
1.執行 spring-boot:run
2.以 debug 方式啟動 remote
二、參考資料
1.
SpringBoot 熱加載以及添加debug調試