A solution that uses devTools works :
1 – Adding devtools to your project
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
2 – Enabling automatic build
Open the Settings –> Build-Execution-Deployment –> Compiler and enable :
Build Project Automatically.
3 – Update the value of compiler.automake.allow.when.app.running
press ctrl+shift+A
and search for the registry
. In the registry, enable :
compiler.automake.allow.when.app.running
References :
- https://dzone.com/articles/spring-boot-application-live-reload-hot-swap-with