Refreshing static content with Spring MVC and Boot

A recap of the original problem

I’ve run into the problem that when I make modifications to my static content (html, js, css), I have to restart the application every time

I had the same problem and finally solved it by adding

<configuration>
    <addResources>true</addResources>
</configuration>

to spring-boot-maven-plugin in the pom.xml
I got confused by this spring-boot-devtools thing, but it had no effect whatever I did.

My static content is stored in “src/main/resources/public” folder.

Your path is just fine. src/main/resources/static is also fine.

Leave a Comment