Spring Boot DevTools not working in Eclipse

In your eclipse top menu your Project -> Build Automatically ON ?


I followed this article https://github.com/spring-projects/spring-boot/issues/7479

So, to devtools works, you must add:

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

The secret is add Optional True and Scope runtime.


This question is already answered, but for me didn't worked exactly as the accepted answer or other answers tells.

I've got devtools working in the following way:

1) Using the devtools dependency as following:

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

2) Deleting the Spring Maven cache, in Linux it would be:

rm -rf ~/.m2/repository/org/springframework/*

3) Back into Eclipse, pressing Alt+F5 and forcing to clean the project re-downloading every dependency from Maven to your cache.

The key is to set the optional flag to true into the devtools' dependency AND wiping the Maven cache.

Hope this is helpful to someone.