스프링 부트 + jsp + 시큐리티 연동 시 302
2024. 3. 13. 10:58ㆍ웹개발/Spring Boot
728x90
컨트롤러 설정을 다 하고 시큐리티와 연동했을때 자꾸 Forwarding을 정상적으로 하지 못하는 문제에 도달했다.
이것저것 검색해봐도 사실 뭐가 문제인지몰랐다가 SecurityFilterChain에서 authorizeHttpRequests의 Matchers에
추가적으로 설정해야하는 것을 간신히 찾아냄
http.authorizeHttpRequests((authorize) ->
authorize.dispatcherTypeMatchers(DispatcherType.FORWARD, DispatcherType.ERROR, DispatcherType.INCLUDE).permitAll()
다음과 같이 dispatcherTypeMatchers에 추가해주면 끝!
728x90
반응형
'웹개발 > Spring Boot' 카테고리의 다른 글
Spring Boot에서 어노테이션으로 세션 사용자 가져오기 (0) | 2024.11.20 |
---|---|
스프링 부트 + jsp 연동 (0) | 2024.03.13 |
JAVA Enum Value로 Key 찾아오기 (0) | 2023.07.06 |
Spring Boot Controller 에서 전체 파라메터 폼 클래스 유효성 검증 (0) | 2023.07.05 |
Spring Boot Validated 유효성 검증 그룹 설정 (0) | 2023.07.04 |