Recently we uplifted spring cloud from 2022.x to 2023.x version and suddenly our eureka server application started failing with the error.
`Description:
The dependencies of some of the beans in the application context form a cycle:
┌─────┐
| org.springframework.cloud.netflix.eureka.server.EurekaServerAutoConfiguration (field private com.netflix.appinfo.ApplicationInfoManager org.springframework.cloud.netflix.eureka.server.EurekaServerAutoConfiguration.applicationInfoManager)
↑ ↓
| org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$EurekaClientConfiguration (field private com.netflix.discovery.AbstractDiscoveryClientOptionalArgs org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$EurekaClientConfiguration.optionalArgs)
└─────┘
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.
Not sure if this is the right place to ask. Can anybody help??
Setting spring.main.allow-circular-references
to true
works for now.
Comment From: OlgaMaciaszek
Hello @Subrhamanya, thanks for reporting the issue. Please provide a minimal, complete, verifiable example that reproduces the issue.
Comment From: spring-cloud-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-cloud-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.