Spring Boot Devtools - Automatic Reload

Read: https://docs.spring.io/spring-boot/docs/1.5.16.RELEASE/reference/html/using-boot-devtools.html

Spring DevTools is a solution provided by Spring that automatically restarts the server whenever changes are saved in the Java classpath. It eliminates the need for manual server restarts, which can be time-consuming and reduce productivity. By default, Spring DevTools monitors specific folders in the classpath for changes. To include Spring DevTools in your project, you need to add the dependency in the build.gradle file. It significantly improves the development experience by providing faster server restarts and streamlining the development workflow.

If you want the application to automatically restart whenever files on the project classpath change, use this.

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <scope>runtime</scope>
    <optional>true</optional>
</dependency>

Links to this note