강의

멘토링

커뮤니티

Inflearn Community Q&A

ak46860168's profile image
ak46860168

asked

Spring Security OAuth2

Understanding the Initialization Process - SecurityBuilder / SecurityConfigurer

boot 3.0 이상 버전에서 apply()

Written on

·

615

0

apply() 에서 CustomSecurityConfigurer 를 넣어주는게 deprecated 가 됐는데 구글링을 해도 정보가 많지 않습니다.

 

어떻게 설정해야 하나요?

javaspringspring-bootoauth

Answer 2

1

아래와 같이 작성하시면 되세요.

참고 url : https://docs.spring.io/spring-security/reference/servlet/configuration/java.html#jc-custom-dsls

http.with(new CustomSecurityConfigurer(), (conf) -> conf
               .setFlag(false));

1

leaven님의 프로필 이미지
leaven
Instructor

아 네

apply() 대신 with() 로 해 보시기 바랍니다

ak4686님의 프로필 이미지
ak4686
Questioner

with() 를 사용할 때 파라미터 2개를 필요로 하는데 첫 번째는 강의에서 나온 대로 CustomSecurityConfigurer 를 넣어주면 되는거 같은데 2번째 인자는 어떻게 넣어야 할까요??

ak46860168's profile image
ak46860168

asked

Ask a question