During the use of spring boot, I found that I modified the static file. After the foreground refresh, there was no change. I had to restart to see it. This is simply unacceptable.
So is there any way to solve this problem?
After Baidu, I got the desired answer and recorded it here.
1. pom.xml modification
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
In the pom.xml file, add this configuration to update the static files modified in the background
2. file->settings
In the above picture, select the part in the red circle
3. shift + ctrl + alt + /
Through the above shortcut keys, a Maintenance pop-up window will pop up, select the first one
After setting this way, how can it be so cool when encoding it!
After the program starts running, you don’t have to restart and restart. The writing is almost done, refresh the interface and it will be OK. If you use a dual-screen monitor, you will enjoy coding.
The above example of spring boot automatically updating static files and background code is all the content I share with you. I hope you can give you a reference and I hope you can support Wulin.com more.