Spring Boot DevTools
Sankar Karra
Senior Engineer L2 at Ness Digital Engineering Private Limited | Expert in Java, Spring Boot, Spring Reactive, & Microservices | Cloud (AWS, Azure) | CI/CD (GitHub Actions, Jenkins) | MySQL, MongoDB | Docker & Kubernetes
Spring Boot Devtools:
Step1:
1. Spring Boot DevTools provides automatic restart functionality,
allowing developers to quickly see changes made to their application without needing to manually restart the server.
2. Any changes to class files trigger a restart of the application,
speeding up the development process.
Step2:
Spring Boot Devtools Features:
Automatic restart.
Step3: Add Dependency:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
Step4:
Q) How to disable Auto Reload in Spring Boot application?
A) System.setProperty("spring.devtools.restart.enabled", "false");
Step5:
Enabling automatic Restart in Intellij:
a. File>Settings>Build,Execuion,Deployment>compiler>select Build Project Automatically
b. Advanced Settings>compiler>select Allow auto-make to start even if developed application is currently running.