inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

코난님의 게시글

코난 코난

@kgh1986213527

수강평 작성수
-
평균평점
-

게시글 1

질문&답변

Spring Boot 최신 3.XX 버전 Security 설정 공유드립니다.

@Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { return http.csrf().disable() .headers(authorize -> authorize .frameOptions().disable()) .authorizeHttpRequests(authorize -> authorize .requestMatchers(WHITE_LIST).permitAll() .requestMatchers(PathRequest.toH2Console()).permitAll()) .getOrBuild(); } 추가적으로 security 설정 부분에서 람다식을 이용하여 메소드 체이닝으로 좀 더 간결하게 작성 할 수 있습니다

좋아요수
18
댓글수
7
조회수
10141