これはxml構成では簡単だと思っていましたが、現在Javaコード構成を使用しているときは迷子になったので、静的リソースディレクトリの非セキュリティチェックを許可するようにSpringセキュリティを構成する方法を誰か教えてもらえますか?
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.csrf().disable()
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and()
.authorizeRequests().antMatchers(actuatorEndpoints()).hasRole(backendAdminRole)
.and()
.authorizeRequests().antMatchers(apiEndpoints()).hasRole(frontendUserRole)
***//what code can I add here to make static directory/recourse not checked by spring security?***
.anyRequest().authenticated()
.and().anonymous().disable()
.exceptionHandling().authenticationEntryPoint(unauthorizedEntryPoint());
;
}
最初に親切なヘルプをありがとうございました