Issue
Spring boot upgrade Error
Spring boot application fails to start after upgrading to 2.6.0 due to circular dependency
Error creating bean with name 'securityConfig':
Requested bean is currently in creation: Is there an
unresolvable circular reference?
Solution
Circular References Prohibited by Default
in spring boot version 2.6
If your application fails to start due to a BeanCurrentlyInCreationException you are strongly encouraged to update your configuration to break the dependency cycle.
The temporary solution is to restore 2.5’s behavior, set the following in .properties/yml
,
spring:
main:
allow-circular-references: true
Answered By - Thirumal
Answer Checked By - Terry (JavaFixing Volunteer)