1、環境
- IntelliJ IDEA 2018.1.4 x64
2、Spring Boot配置(pom.xml)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
3、IDEA配置
- 自動build ==> settings ==> 找到並勾選Build project automatically
- Register配置 ==> Ctrl+Shift+Alt+/ ==> 找到並勾選compiler.automake.allow.when.app.running==> 重啓IDEA
4、測試
確認IDEA重啓後,debug啓動SpringBoot項目