/ #backend #java 

Spring Boot Devtools on Intellij

Auto reloading feature does not work out of the box in Intellij. Below are the changes required to make it work correctly.

Spring Boot provide niche feature of hot reloading for a Spring Boot application.

It recompile your java application as soon as you make a change. But most important aspect is that it only recompile only those files in which changes are made. Thus process take quite a short time compared to complete application build. You can read more about DevTools here.

But this feature does not work out of the box in IntelliJ by just adding required dependancy in your application.

Below are all the steps required to make auto reload work in IntelliJ.

Add Spring DevTools dependency


Changes in IntelliJ build configuration

Go to Preference -> build,execution,deployment. -> Compiler.

And Enable build project automatically

Build Project Automatically

Changes in IntelliJ registory

Go to Cmd+Shift +A (Mac) or Ctrl+ Shift+A (Windows) -> Registry

Enable compiler.automake.allow.when.app.running

Changes in IntelliJ registory

Thats it. Enjoy the faster development!!!