Pages

Subscribe:

Ads 468x60px

Thursday, October 20, 2016

Spring Boot Application Live Reload (Hot Swap) with Intellij IDEA

While developing Spring Boot Applications using Intellij IDEA, it was so annoying to restart the spring boot app after each and every change. Spring boot provides live reload (how swap) of application out of the box using the following dependency.
 
<dependency>
   
<groupid>org.springframework.boot</groupid>
   
<artifactid>spring-boot-devtools</artifactid>
 
</dependency>

But it didn't live reload the application/container and the hot deployment, didn't work for changes. Further researching found that following changes needed to be done, in order the hot deployment to be worked correctly.

1. Open the Settings --> Build-Execution-Deployment --> Compiler
    and enable the Make Project Automatically.

2. Then press ctrl+shift+A and search for registry. In the registry make the following configuration enabled.

compiler.automake.allow.when.app.running

3. Restart the IDE.

That's it now the hot deployment works and you don't have to restart manually after each and every change. :)

No comments:

Post a Comment