Spring boot application and addStyleSheet ?

I am trying to load css file



Error loading http://localhost:8080/styles.css

How to fix this issue ?

put it in resources/static

Hello. For anyone stumbling on this issue, here is a good post about static issues in Spring Boot https://spring.io/blog/2013/12/19/serving-static-web-content-with-spring-boot it is a bit old, but still valid.