Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circular reference - Bean creation not ready after Upgrade to Spring Boot 2.6 #92

Closed
MarcGiffing opened this issue Dec 28, 2021 · 0 comments

Comments

@MarcGiffing
Copy link
Owner

MarcGiffing commented Dec 28, 2021

The @PostConstruct annotated method for initializing the filters failed because the beans, annoted with @beans in the same class, are not intitialized yet.

This circular reference check was introduced in Spring Boot 2.6


APPLICATION FAILED TO START


Description:

The dependencies of some of the beans in the application context form a cycle:

┌──->──┐
| com.giffing.bucket4j.spring.boot.starter.config.gateway.Bucket4JAutoConfigurationSpringCloudGatewayFilter
└──<-──┘

Action:

Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove the dependency cycle between beans. As a last resort, it may be possible to break the cycle automatically by setting spring.main.allow-circular-references to true.

@MarcGiffing MarcGiffing changed the title Spring Cloud Gateway - Circular reference - Bean creation not ready Circular reference - Bean creation not ready after Upgrade to Spring Boot 2.6 Dec 28, 2021
MarcGiffing added a commit that referenced this issue Dec 28, 2021
move Bucket4jConfigurationHolder and gatewayFilterExpressionParser to
separated configuration class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant