WebNov 24, 2024 · 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. 👍 7 abdimajidov, … WebOct 17, 2024 · Circular dependencies are the scenarios when two or more beans try to inject each other via constructor. Let's consider following two classes (outside of Spring …
Spring如何解决循环引用 Rico
WebDec 27, 2024 · 更新应用程序以删除bean之间的依赖循环。. 作为最后的手段,可以通过设置spring.main来自动打破循环。. allow-circular-references为true。. 可以通过在配置文件中 … WebMay 6, 2024 · Solution 1. Spring uses an special logic for resolving this kind of circular dependencies with singleton beans. But this won't apply to other scopes. There is no … define the name reed
java - Circular reference in Spring Boot - Stack Overflow
WebSep 27, 2012 · It's enough that a central service, which is autowired in many services, consuming one of the other services, the circular dependency will likely to occur. The … WebFeb 27, 2024 · There are 2 solutions to fix it. Solution 1: You set allow-bean-definition-overriding is true in application.properties. spring.main.allow-bean-definition … WebMar 10, 2024 · 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 … define the name olive