Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- redis 설정
- Exception Handing
- REST 성숙도 모델
- docker
- 선언적 배포
- SQL 내장 함수
- abstract 제어자
- 특정 행
- apt-rdepends
- 도커
- 폐쇄망
- 객체
- 의존성 패키지 설치
- 특정 행 출력
- 오프라인 설치
- 예외 전가
- 웹 애플리케이션 아키텍처
- 포함 관계
- image 압축
- kafkaCLI
- 의존성 설치
- redis 명령어
- 쿠버네티스 패턴
- 예측 범위 내의 요구사항
- ubuntu redis
- 웹 애플리케이션 요청 흐름
- redis 외부설정
- Port already in use: 9999
- 자료구조
- Oracle.DatabaseError
Archives
- Today
- Total
리꾸므
17번째 발자국_Spring_Sequrity_WebSecurityConfigurerAdapter_지원중단 본문
Spring Security를 적용했는데 WebSecurityConfigurerAdapter가 상속되지않았다. 이 문제로 공식문서를 확인해보니 스프링 시큐리티 5.7.0-M2버전부터 WebSecurityConfigurerAdapter를 사용하지 않는다고 나와 있다. 그래서 해결법이 뭔가하니 @Override 대신 @Bean을 등록하는 방법으로 바뀌었다.
HttpSecurity 5.7이전
@Configuration
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeHttpRequests((authz) -> authz
.anyRequest().authenticated()
)
.httpBasic(withDefaults());
}
}
HttpSecurity 5.7이후
@Configuration
public class SecurityConfiguration {
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
.authorizeHttpRequests((authz) -> authz
.anyRequest().authenticated()
)
.httpBasic(withDefaults());
return http.build();
}
}
WebSecurity 5.7이전
@Configuration
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
public void configure(WebSecurity web) {
web.ignoring().antMatchers("/ignore1", "/ignore2");
}
}
WebSecurity 5.7이후
@Configuration
public class SecurityConfiguration {
@Bean
public WebSecurityCustomizer webSecurityCustomizer() {
return (web) -> web.ignoring().antMatchers("/ignore1", "/ignore2");
}
}
참고
https://spring.io/blog/2022/02/21/spring-security-without-the-websecurityconfigureradapter
'발걸음 > 오류창고' 카테고리의 다른 글
Airflow 관련 오류 모음 (0) | 2023.01.25 |
---|---|
[Spring boot]Web server failed to start. Port 8080 was already in use (0) | 2022.11.30 |
Redis 외부접속 오류(feat. protected mode) (0) | 2022.09.22 |
H2-console 에러(feat.webAllowOthers) (0) | 2022.09.07 |
ould not execute statement; SQL~오류 (0) | 2022.08.29 |