1 pom.xml file
Note: The hot deployment function spring-boot-1.3 has started
<!--Add dependency--><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <!-- optional=true, the dependency will not be passed, the project depends on devtools; if the project that depends on myboot project wants to use devtools, it needs to be reintroduced--> <optional>true</optional></dependency>
Note: Adding spring-boot-maven-plugin in project is mainly used in eclipse, and this configuration is not required to be added in 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", check "Build project automatically".
2) Key combination: "Shift+Ctrl+Alt+/", select "Registry", and select "compiler.automake.allow.when.app.running".
3 Chrome disables cache
F12 or "Ctrl+Shift+I", open the developer tool, and select "Disable Cache(while DevTools is open)" under the "Network" tab.
Summarize
The above is the editor’s timely method of implementing hot deployment of spring boot devtools in Idea. I hope it will be helpful to everyone. If you have any questions, please leave me a message. The editor will reply to everyone in time!