1 pom.xml file
Note : The hot deployment function has been available since spring-boot-1.3
<!-- Add dependency --> < dependency > < groupId > org.springframework.boot </ groupId > < artifactId > spring-boot-devtools </ artifactId > <!-- optional=true, the dependency will not be passed, the The project depends on devtools; if the project that depends on the myboot project wants to use devtools, it needs to be re-introduced --> < optional > true </ optional > </ dependency >
Note : The spring-boot-maven-plugin is added to the project, which is mainly used in eclipse. This configuration does not need to be added to the 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”,选中打勾 “Build project automatically” 。
2) Key combination: "Shift+Ctrl+Alt+/", select "Registry", check "compiler.automake.allow.when.app.running".
3 Chrome disable cache
F12 or "Ctrl+Shift+I", open the developer tools, select "Disable Cache(while DevTools is open)" under the "Network" tab
Transfer: https://www.cnblogs.com/sprinkle/p/7058630.html