Springboot “hot” deployment solution
There are two ways of spring boot hot deployment
1. Springloader plug-in
Disadvantages: Java code does deployment processing. But there's nothing you can do about the page.
2. Devtools
Fully automated deployment
The difference between spring loader and devtools: spring loader: hot deployment is used when deploying the project. Devtools: the redeployment method is used when deploying the project
The second is exactly redeployment. This blog mainly introduces the second, so this article uses "hot"
The devtools tool uses:
Add dependency in POM file
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
This is no problem in eclipse, but the idea (PJ, emmm) used by bloggers found it useless, and then there was a wave of Baidu + Google
Finally, the solution is as follows:
Then shift + Ctrl + Alt + /, select registry
After entering, find the option shown in the figure below and check it
Then configure in the configuration file
spring.devtools.restart.poll-interval=3000ms
spring.devtools.restart.quiet-period=2999ms
The solution comes from:
Click to view the stack overflow post