The dependencies of some of the beans in the application context form a cycle
Two or more Spring beans depend on each other through constructors, and Spring Boot 2.6+ forbids cycles by default.
Seen on:
Java
Meaning
A → B → A cycles can’t be built with constructor injection. Spring prints the cycle; the fix is usually a design change.
Common causes
- Services injecting each other
- Configuration classes depending on beans they define
⚡ Quick fix
- Extract shared logic into a third bean
- Use events or interfaces to decouple
- As a last resort, @Lazy on one injection point
Detailed fix by platform
Java
public OrderService(@Lazy PaymentService payments) { … }
How to diagnose
- Cycle — Which beans are listed?
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026