지금까지의 모든 요청 들을 시큐리티가 필터를 적용해서 인증했다.

static 파일에 대한 요청은 필터에서 무시해야 된다.

WebSecurity를 설정하면 된다.

@Override
public void configure(WebSecurity web) throws Exception {
	web.ignoring().mvcMatchers("/favicon.ico");
}

그렇지만 매번 static 리소스를 넣을 순 없다.

@Override
public void configure(WebSecurity web) throws Exception {
	web.ignoring().requestMatchers(PathRequest.toStaticResources().atCommonLocations());
}

이처럼 static resource를 처리할 수 있다. 스프링 부트