Under IDEA environments devtools
achieve the thermal load and modify the code to achieve hot deployment need to restart the
1. The introduction of maven dependent devtools
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
2. Also arranged in a fork attribute in a plugin, and configured to true.
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
3. Set IDEA
Runtime compiler configuration: the key combination: "Shift + Ctrl + Alt + /", select the "Registry", select the tick "compiler.automake.allow.when.app.running".
4. Compile automated configuration:
“File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,选中打勾 “Build project automatically” 。
5. Configure about application.properties
In some versions we need to configure the switch thermal load into force, its value is equal to true. The following is a format configuration properties, like yml format students can self-adjust
#热加载生效
spring.devtools.restart.enabled=true
#额外新增的热加载目录
spring.devtools.restart.additional-paths= src/main/java
#热加载排除目录
#spring.devtools.restart.exclude=