Spring boot devtools implements the hot deployment method in Idea, devtoolsidea
1. pom. xml file
Note: The Hot deployment feature is available starting with spring-boot-1.3.
<! -- Add dependency --> <dependency> <groupId> org. springframework. boot </groupId> <artifactId> spring-boot-devtools </artifactId> <! -- Optional = true. The dependency is not passed. This project depends on devtools. If you want to use devtools, need to re-introduce --> <optional> true </optional> </dependency>
Note: Add spring-boot-maven-plugin to the project, which is mainly used in eclipse and does not need to be added to 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 idea Configuration
1) "File"-> "Settings"-> "Build, Execution, Deplyment"-> "Compiler", and check "Build project automatically ".
2) key combination: "Shift + Ctrl + Alt +/", select "Registry", and check "compiler. automake. allow. when. app. running ".
3 Chrome disable Cache
F12 or "Ctrl + Shift + I" to open the developer tool. Under the "Network" tab, check "Disable Cache (while DevTools is open )"
Summary
The above is a small series for you to implement the hot deployment method of spring boot devtools in Idea in a timely manner. I hope to help you. If you have any questions, please leave a message to me, the editor will reply to you in time!