The resource is under src/main/resources/static/css or src/main/resources/static/js, I\'m using spring boot, and the class of security is:
@Configuration
@En
I had the same problem and the permitAll() solution didn't work for me. I added the following @Overridemethod to my WebSecurityConfigclass.
@Override
public void configure(WebSecurity web) throws Exception {
web
.ignoring()
.antMatchers("/resources/**", "/static/**", "/css/**", "/js/**", "/img/**", "/icon/**");
}
Good Luck!