Spring Security H2 데이터 베이스 사용시 프레임 오류 스프링 시큐리티를 사용하면 자동으로 CSRF 토큰이 생성된다. 측정 페이지 url은 스프링 시큐리티를 해제할 수 있지만, 그 상태로 H2에 접속이 불가하다. H2 콘솔은 스프링과 상관없는 일반 애플리케이션이기 때문에 예외처리를 해주어야한다. 문제화면: @Configuration @EnableWebSecurity public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.authorizeRequests().antMatchers("/**").permitAll() .and() .csrf().ignoringAntMatchers("/h2-console/**") ;.. 2022. 10. 27. 이전 1 다음