1、pom引入spring-boot-devtools
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<version>2.2.6.RELEASE</version>
</dependency>
2、pom加入maven插件
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<addResources>true</addResources>
</configuration>
</plugin>
</plugins>
</build>
3、点击File-Setting,找到Build,点击Compiler,勾选如下4项:
Automatically show first error in editor
Display notification on build completion
Build project automatically
Compile independent modules in parallel
4、按住Ctrl+Shift+Alt+/,问号同一个键的那个,在弹出框中选择Registry,找到如下2项并勾选。
compiler.automake.allow.when.app.running
actionSystem.assertFocusAccessFromEdt