question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Break circular references which disabled by default since spring boot 2.6

See original GitHub issue

***************************
APPLICATION FAILED TO START
***************************

Description:

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

┌─────┐
|  requestMappingHandlerMapping defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]
↑     ↓
|  openApiResource defined in class path resource [org/springdoc/webmvc/core/SpringDocWebMvcConfiguration.class]
└─────┘


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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

9reactions
quaffcommented, Nov 26, 2021

I have this error too. I put in application.properties : spring.main.allow-circular-references=true but it didn’t work

spring.main.allow-circular-references: true works for me.

3reactions
thodorispacommented, Nov 25, 2021

I have this error too. I put in application.properties : spring.main.allow-circular-references=true but it didn’t work

Read more comments on GitHub >

github_iconTop Results From Across the Web

SpringBoot 2.6.x coping strategies after disabling cyclic ...
Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove the dependency cycle ...
Read more >
Spring boot application fails to start after upgrading to 2.6.0 ...
Circular References Prohibited by Default in spring boot version 2.6 ... to update your configuration to break the dependency cycle.
Read more >
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.
Read more >
Please don't use circular dependencies in Spring Boot projects
Action: Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove the dependency cycle between beans ......
Read more >
Spring Boot 2.6.0 is officially released: circular dependencies ...
a) └─────┘ Action: Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found