Step1:添加maven依赖
添加devtools依赖,并修改插件配置
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
Step2:修改设置
- File->Settings->Build,Execution,Deployment->Compiler->勾选Builde project automatically
- Ctrl+Shift+Alt+/,点击Registry,勾选compiler.automake.allow.when.app.running