http://localhost:8080/error?continue
There was an unexpected error (type=None, status=999).
:8080/favicon.ico:1 Failed to load resource: the server responded with a status of 404 ()
spring security를 이용한 로그인 과정에서 다음과 같은 에러가 났다.
1. security config파일을 확인해봤다.
@Bean
public WebSecurityCustomizer webSecurityCustomizer() {
return new WebSecurityCustomizer() {
@Override
public void customize(WebSecurity web) {
web.ignoring().requestMatchers(
"/css/**",
"/js/**",
"/image/**",
"/health/**",
"/actuator/**",
"/h2-console/**");
}
};
}
formlogin에서 성공하면 /playlist/all이 호출되어야 한다.
검색해보니 spring 로그인 페이지에서는 정적리소스를 무시하는 패턴에 'favicon.ico' 와 '/error'를 추가해주어야 한다.
@Bean
public WebSecurityCustomizer webSecurityCustomizer() {
return new WebSecurityCustomizer() {
@Override
public void customize(WebSecurity web) {
web.ignoring().requestMatchers(
"/favicon.ico","/resources/**","/error",
"/css/**",
"/js/**",
"/image/**",
"/health/**",
"/actuator/**",
"/h2-console/**");
}
};
}
https://stackoverflow.com/questions/61029340/spring-security-redirects-to-page-with-status-code-999