how to make auto reload with Spring-boot on IDEA Intellij
Solution 1:
First, be sure that you added spring-boot-devtools
as dependency:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
Second, verify that the option check-box File->Setting –> Build, Execution, Deployment –> Compiler–>
Build project automatically is selected.
Last, press SHIFT+CTRL+A
for Linux/Windows users or Command+SHIFT+A
for Mac users, then type registry in the opened pop-up window. Scroll down to Registry...
using the down arrow key and hit ENTER
on Registry...
. In the Registry
window verify the option compiler.automake.allow.when.app.running is checked.
If the static files are not reloaded, press CTRL+F9
to force a reload.
The instructions above are taken from here
Solution 2:
Note :: For who those not found that option in registry.The newer version of intellij idea for my case @Version:2021.2 the compiler.automake.allow.when.app.running option is moved to advanced settings:
Solution 3:
For macOS
-
Preference -> Compiler -> check "Build project automatically"
-
shift + command + A
check compiler.automake.allow.when.app.running
If the static files are not reloaded, press CTRL+F9
to force a reload.