I have a standalone Spring Boot application with templates in /src/main/resources/templates and static content in /src/main/resources/static. I would like the static content
The static content in classpath:/static
is served at the root of the application (i.e. /*
), whether or not the application is secure, so you need to match on specific paths underneath the root. Spring Boot permits all access by default to /js/**
, /css/**
, /images/**
(see SpringBootWebSecurityConfiguration
for details), but you may have switched that off (can't see the rest of your code).