Spring Boot - Dependency for DevTools

In general, when we make some code change on a Spring Boot application code base, we need to manually run the application to see the changes.

The Spring Boot application that uses the below devtools dependency automatically restarts the application whenever the files on the classpath change.

We simply need to add the below dependency in pom.xml file.

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

Conclusion

Now, we know the benefits of using the devtools dependency on a Spring Boot application.