Spring boot in IDEA using devtools hot deployment is not successful, do not pay attention to things!
A lot of articles about hot deployment of spring boot using devtools were searched on the Internet, and they all said that the main unsuccessful problems were the following two points:
1. Check the Build project automatically option in settings- > build,execution,Deployment- > compiler:
2. Press the ctrl+shift+alt+/, key combination, select 1.Registry, and check compiler.automake.allow.when.app.running
Finally, restart the project, and you can see the effect of hot deployment.
But I tried for a long time and still didn't respond.
Then, I tried to force the use of additional-paths on the package path that needed hot deployment: on configuration, I found that idea had a rerelease action when making changes. I thought it was okay, but I was glad that the new code was still not updated, so it seems that this speculative method still doesn't work.
Finally, I finally found the problem, which is not mentioned on the Internet. Every time I start a project, I use gradle- > tasks- > application- > bootRun.
This is where the problem arises. If you directly use the startup configuration of the project, as shown below:
The hot deployment will take effect. Ha
Guess it should be caused by the different startup configuration of the gradle and the project itself!