spring (4) 썸네일형 리스트형 중복로그인(동시접속) 방지 수정기(security, AuthenticationSuccessHandler) 중복로그인 방지 수정기(security, AuthenticationSuccessHandler) 보안 관련 수정을 진행하며 관리자 사이트에 중복로그인을 막아달라는 요청이있었다. 스프링에서 다들 많이 이용하는 spring security를 이용하는 서비스였고 security 설정 파일에 설정 추가해주는것으로 끝날 줄 알았다. security 설정 파일에 설정 추가 보통 security-context.xml 또는 자신이 설정한 설정파일에 설정을 추가해주면된다. 이 프로젝트의 경우에는 application-context.xml안에 설정이 되어있었다. 어느 파일에 설정을 하던 xml파일의 상단에 스키마 추가하고 불러오기 때문에 자신의 프로젝트에 맞는 부분을 찾으면된다. 설정을 읽어보는데 이미 security에 중.. Index 256 out of bounds for length 256 에러 Index 256 out of bounds for length 256 에러 원인 프론트에서 form으로 데이터를 백으로 넘기는데 백에서 Model 혹은 VO에 선언한 private List에 컨트롤러에서 동적 리스트 바인딩을 하는 도중에 발생한 에러이다. 스프링의 경우 동적리스트 바인딩의 기본설정 최대 크기가 256으로 설정되어있는데 256을 넘길 경우 발생하는 에러이다. 해결 해당 에러가 발생하는(동적 리스트 바인딩을 수행하는) 컨트롤러 상단부분에 아래 코드를 추가해준다. 추가할 부분 @InitBinder public void initBinder(WebDataBinder binder) { binder.setAutoGrowCollectionLimit(1024); } Spring Security5 OAuth2 Spring Security 5 OAuth Spring Security 5 이전의 OAuth OAuth Client 설정 및 주의할 점 OAuth Server 설정 및 주의할 점 Spring Security란? Spring Framework 기반 인증, 인가 프레임워크 Spring 기반 애플리케이션에서는 사실상 표준(de-facto standard) Spring Security 5 Spring Boot 2.0부터 이용가능 Spring Framework 5.0 기반 새로운 특징 OAuth 2.0 Login Spring Security 5 OAuth 아래와 같이 이용 @Configuration public class SecurityConfig extends WebSecurityConfigurerAdapter.. The type WebSecurityConfigurerAdapter is deprecated The type WebSecurityConfigurerAdapter is deprecated 더 이상 WebSecurityConfigurerAdapter가 사용되지 않습니다.. 잉? 간만에 스프링 부트로 시큐리티 설정하는데 public class WebSecurityConfig extends WebSecurityConfigurerAdapter 취소선이 따악! The type WebSecurityConfigurerAdapter is deprecated라고 떠 있었다.. 구글링해서 몇가지 글들이 있었지만 언제나 공식문서가 정답이었기에 공식문서 읽는 습관을 들이자.... 원인 2022년 2월 21일 스프링 공식문서 https://spring.io/blog/2022/02/21/spring-security-wit.. 이전 1 다음