강의

멘토링

커뮤니티

Inflearn Community Q&A

mindecco's profile image
mindecco

asked

Spring Security

2) Filter initialization and multi-security settings

다중 필터 구현 시, antMatchers 사용

Written on

·

482

0

예제에서는 antMatcher('/admin/**') 이런식으로

특정 url 하나만 지정을 했는데

혹시 '/user/**' 도 같이 Match 시키고 싶은데

antMatcher 는 1개만 처리해주는 것 같습니다.


꼭 새로운 FilterChain 을 생성해서 설정해야하나요?

 

javaspring-bootspring-security

Answer 2

1

leaven님의 프로필 이미지
leaven
Instructor

아 네 맞습니다

antMatcher 는 특정한 url 을 지정하기 위한 api 이기 때문에 다수 지정은 안됩니다

말씀하신 것 처럼 새로운 filterchain 을 생성해야 합니다

0

mindecco님의 프로필 이미지
mindecco
Questioner

혹시 참고하실 분 계실까봐 말씀드립니다.

스크린샷 2023-09-26 144947.png이런식으로 requestMachers 사용하니까 되네요!

mindecco's profile image
mindecco

asked

Ask a question