Changes To Spring @Autowired From Spring Boot 2.5.6 to 2.6.2

Viewed 577

We have a Spring Boot App packaged as a war file and deployed on Wildfly. When I update the Spring Boot version from 2.5.6 to 2.6.2, I see lots of exception with Spring Autowire of variables. The problems being reported are circular dependency.

Has something changes with new version of Spring that changes how the autowiring works? I tried to research and can find no mention to changes in that area.

Thanks

1 Answers

The thing is that with the new Spring Boot version, circular dependencies are not allowed by default. Check the release notes.

You can get back to the previous behaviour setting the following configuration:

spring.main.allow-circular-references: true

However, I would suggest you revisit the application design.

Related