본문 바로가기
with my rubber duck/errors

WebSecurityConfig에서 BeanCurrentlyInCreationException

by stilinski 2022. 6. 14.
728x90

서버가 안돌아감

org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'webSecurityConfig': Requested bean is currently in creation: Is there an unresolvable circular reference?

..?

뭐가 참조가 안되고있나봄

 

 

여기에 문제있다고 뜸

 

밑에 잘 있는데 왜저래

빈으로 등록이 잘 안되나

 

나와 완전 똑같은 문제 직면한 네티즌 발견

https://stackoverflow.com/questions/70130209/beancurrentlyincreationexception-after-upgrading-boot-to-2-6

 

BeanCurrentlyInCreationException after upgrading Boot to 2.6

After upgrading my project to Spring Boot 2.6.0, I'm getting the following exception during startup: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name '

stackoverflow.com

 

 

알고보니 passwordencoder는 잘 등록 됐는데 그걸 사용하고 있는 configureGlobal메서드에서 안불러짐. 원래는 됐었나봄. 요즘 최신버전의 스프링부트가 지원 안한다함. 암튼 configureGlobal를 다른클래스에 넣던가 더 간편한건 passwordencoder를 static으로 지정하기.

 

잘됨 굿굿

 

 

 

 


spring circular reference가 뭔지 찾아봄

https://www.baeldung.com/circular-dependencies-in-spring

 

Circular Dependencies in Spring | Baeldung

A quick writeup on dealing with circular dependencies in Spring: how they occur and several ways to work around them.

www.baeldung.com

그렇구나 ..

 

728x90

댓글