最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Error creating bean with name 'org.springframework.security.authenticationManager': Requested bean is currently

programmeradmin3浏览0评论

I'm using FlightRecorderApplicationStartup to gain insight in my spring application startup.

I find numerous spring.beans.instantiate events tagged like this:

beanName=.springframework.security.authenticationManager,exception=class .springframework.beans.factory.BeanCurrentlyInCreationException, message=Error creating bean with name '.springframework.security.authenticationManager': Requested bean is currently in creation: Is there an unresolvable circular reference or an asynchronous initialization dependency?, beanName=.springframework.security.authenticationManager,exception=class .springframework.beans.factory.BeanCurrentlyInCreationException,message=Error creating bean with name '.springframework.security.authenticationManager': Requested bean is currently in creation: Is there an unresolvable circular reference or an asynchronous initialization dependency?

Typically hundreds of such events all have the same parentId (which is just another spring.beans.instantiate of one of my beans).

I would like to learn how to understand this. How can spring log this problem and still work around it?

It looks like spring fails to create this bean many times, while still proceeding (my application starts fine).

I assume this is not the ideal flow of events: what can i do to investigate?

If this is an indication of the fact that i would have circular bean dependencies, how can i identify the beans involved in a circular dependency chain? I know adding @Lazy at specific points is a solution, but i don't know how to find the cycles.

Using

<.springframework.version>6.2.2</.springframework.version>
<.springframework.security.version>6.4.2</.springframework.security.version>

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论