Abstract: The so-called hot deployment means upgrading the software while the application is running, without restarting the application. For Java applications, hot deployment is to update Java class files at runtime.
1. Add dependencies to the corresponding pom.xml file
<!--Hot Deployment Function-Add dependencies by [email protected] --><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>
2. Note: Add spring-boot-maven-plugin to project, which is mainly used in eclipse, and this configuration is not required to be added in idea. 【IDEA ignores this step (⊙o⊙)? 】
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> </configuration> </plugin> </plugins></build>
3. 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".
4. Chrome disables cache [Open during development]
F12 or "Ctrl+Shift+I", open the developer tool, and under the "Network" tab, select "Disable Cache(while DevTools is open)"
The above is all the content of this article. I hope it will be helpful to everyone's learning and I hope everyone will support Wulin.com more.