The property spring.main.allow-circular-references=true works as expected when it present in the application's local configuration file such as the application.properties file or bootstrap.yaml file. It doesn't work when it is moved to Spring Cloud Config Server and fetched from there for the same application. The application starts giving the circular dependency error which it usually gives when the property itself isn't present.

Spring boot version: 2.7.5. Spring cloud version: 2021.0.6

Comment From: ryanjbaxter

You cannot set spring.main properties from a remote property source. Spring Boot binds them very early on when SpringApplication.run is called.

https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java#L539

Comment From: lathutkarsh

Oh okay understood. Thanks for the clarification!