spring boot devtools implements the hot deployment method in Idea
- 2021-01-22 05:08:06
- OfStack
1 pom. xml file
Note: The hot deployment function spring-boot-1.3 has been available since then
<!-- Add the dependent -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<!-- optional=true, Dependencies are not passed, the project is dependent devtools ; After relying on myboot Project of the project if you want to use devtools , need to be reintroduced -->
<optional>true</optional>
</dependency>
Note: spring-boot-maven-plugin is added to project for use in eclipse. This configuration is not required for idea.
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
</plugins>
</build>
2 Change the idea configuration
1) - "File" > "Settings" - > "Build Execution, Deplyment" - > "Compiler", check the box "Build project automatically".
2) key combination: "Shift + Ctrl + Alt + /", select "Registry", select the box "compiler. automake. allow. when. app. running".
3 Chrome disables caching
F12 or "Ctrl+Shift+I", open the Developer Tools and check "Disable Cache(while DevTools is open)" under the "Network" TAB.
conclusion
The above is this site to give you timely spring boot devtools hot deployment method in Idea, I hope to help you, if you have any questions welcome to give me a message, this site will reply to you in time!