java Spring Boot automatically starts hot deployment (don’t restart if you change something)

Above, java Spring Boot manually starts hot deployment. We have implemented a code for manual hot deployment.
But in fact, many people think that this is called hot development. It
is very unfriendly to manually click after writing. In fact, we developers must hope that You don’t need to do this manually by restarting it.
Of course, we can just let it do the Build Project operation by itself.

We select Settings under File in the upper left corner.
Insert image description here
In the new pop-up window, we select Compiler under Build,
Insert image description here
check Build project automatically and then OK. This option is to automatically go to Build Project
Insert image description here
and press the keyboard shortcut ctrl + shift + alt + /
to call up the selection. In Rogstry,
Insert image description here
if there is compiler.automake.allow.when.app.running, just check it.
My IDEA 2019 did not have it for five years, which is weird
Insert image description here
, but it doesn’t matter.

Open Settings under File again, check Allow auto-make to start even if developed application is currently running, and
click OK below.
Insert image description here
Then we start the code and access the interface.
Insert image description here
Then we change this code and press ctrl + S to save the changes
. Wait a few seconds and the log will be updated automatically.
This pause is because if you change a word, you will have to restart it and the system will be destroyed.
Performance loss still needs to be considered.
Insert image description here
Then we can access the interface again to see the content. It will be updated automatically
Insert image description here

Guess you like

Origin blog.csdn.net/weixin_45966674/article/details/133530569