When working on IntelliJ, you have to recompile your source code every time files change. This post will show how to Spring Boot hot swap with Intellij IDE.

1.  Adding devtools to your project

  • Maven
  • Gradle

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 :

Now your Spring Boot application will restart every time changes are made.