How do I get Spring-Boot devtools to live reload updated static files when using VSCode and Gradle?

251 views Asked by At

I've been attempting to get Spring Boot's devtools to work in VSCode on a new project utilizing Gradle as it's builder. However, for some reason whenever a change is made to the src\main\resources\static\index.html it does not automatically live reload the changes and doesn't rebuild the file at build\resources\main\static\index.html. Manually changing this file and refreshing the browser does load the new changes.

When creating the same project utilizing Maven as the builder devtools does work as intended, showing the new changes upon browser refresh.

I am using:

  • Java: 17.0.8.1
  • Gradle 8.4
  • vscode 1.84.2
  • spring-boot-starter-web 3.1.5
  • spring-boot-devtools 3.1.5

I've tried modifying the application.yaml file to watch an additional path of the resources static folder.

0

There are 0 answers