- Published on
Spring Boot DevTools on IntelliJ
- Authors
- Name
- Rahul Neelakantan
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.
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
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
Changes in IntelliJ build configuration
Go to Settings
-> Build, Execution, Deployment
-> Compiler
and then enable build project automatically
Next goto Settings
-> Advanced Settings
and then enable "Allow auto-make to start even if developed application is currently running"
That's all. Whenever you make a change in your application it will be recompiled automatically.