핸들러 singleton Exception이 발생합니다
6826
16 asked
ajaxAuthenticationSuccessHandler
ajaxAuthenticationFailureHandler
이번 강의에 새로 배운 핸들러를 등록하고 구동하려 하니
이전 SecurityContext에서 @Autowired했던
formAuthenticationSuccessHandler()와 충돌이 납니다.
아래는 에러 내용입니다.
물론, @Qualifier를 해주니 에러는 안생기지만 강사님이
강의하신 내용이나 git전체소스를 봐도 @Qualifer를 해주는 부분은 없습니다. 어떻게 해야할까요?
========에러 내용=================
Exception in thread "task-2" org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'delegatingApplicationListener': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
Answer 6
0
@Qualifier("customAuthenticationSuccesshandler")
@Autowired
private AuthenticationSuccessHandler formAuthenticationSuccessHandler;
@Qualifier("customAuthenticationFailurehandler")
@Autowired
private AuthenticationFailureHandler formAuthenticationFailureHandler;
을 아래와 같이 변경해 보시기 바랍니다.
AuthenticationSuccessHandler 인터페이스 타입을 사용하는 경우에는 타입 충돌이 발생하지 않도록
클래스이름의 변수명을 적어 주셔야 합니다.
@Autowired
private AuthenticationSuccessHandler customAuthenticationSuccesshandler;
@Autowired
private AuthenticationFailureHandler customAuthenticationFailurehandler;
0
https://github.com/catsbi/spring-security-lecture.git
깃소스입니다. 여기서 브랜치중 ajax_인증인가처리 부분입니다. ㅠㅠ
시큐리티 공부 버전 질문
0
173
1
[해결 방법] MethodSecurityConfig.customMethodSecurityMetadataSource() 호출하지 않는 이슈
0
183
1
AbstractSecurityInterceptor.class.beforeInvocation()를 2번 실행하는 경우
0
172
1
강의 코드가 왜이렇게 뒤죽박죽인가요...
0
246
1
메인 페이지로 접속해도 login url로 리다이렉트가 되지 않습니다..
0
233
1
파라미터값이 넘어가지 않습니다 ....
0
372
1
security filterChain 설정 질문이 있습니다.
0
328
1
소스 부분 질문 드립니다.
0
206
2
섹션4 7번 강의 문제가 있는거 같네요.
0
342
2
파일이 수시로 이름이 바껴있네요 ㄷㄷ
0
302
1
HttpSessionSecurityContextRepository를 사용안하는 문제
0
553
2
error , exception 이 잘 안됩니다.
0
275
2
thymeleaf tag 질문합니다.
0
194
2
버전업하면서 deprecated된 것들이 너무많아요
0
476
1
spring security 패치 관련
0
435
1
모바일을 사용할때 토큰말고 세션
0
843
2
DB 연동한 인가 부분에 대한 질문입니다!
0
262
1
Ajax방식도 똑같이 Session방식을 사용하는건가요?
0
305
1
Config 파일 생성 시 질문이 있습니다.
0
223
1
강사님 몇일동안 구글 검색만 100개 했는데도 이유를 모르겠습니다..
1
427
2
403 에러 뜹니다.
0
809
2
login_proc의 존재에 대한 간략한 설명입니다
0
272
1
top.html에 로그인 링크를 만들어서 로그인을 해봤습니다
0
275
2
안녕하세요. DB에 저장될 때 이해 안 가는 값이 있어서 질문드립니다!
0
186
1

