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项目