You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding Zalando problem-spring-web dependency to a project using Spring boot 2.7 and Spring Cloud 3.1, an error occurs
Description
Consider the following dependencies:
spring-cloud-starter-bus-amqp 3.1.2
spring-boot-starter-actuator 2.7.11
spring-boot-starter-security 2.7.11
problem-spring-web-starter (Zalando) 0.27.0
If you run an app with these, the app will fail to start, and show the following error: java.lang.IllegalStateException: AutoConfigure cycle detected between org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration and org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration
Expected Behavior
Spring Boot should start correctly.
Actual Behavior
Spring fails to start, and shows the following error: java.lang.IllegalStateException: AutoConfigure cycle detected between org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration and org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration at org.springframework.util.Assert.state(Assert.java:97) ~[spring-core-5.3.27.jar:5.3.27] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.checkForCycles(AutoConfigurationSorter.java:101) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:91) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.sortByAnnotation(AutoConfigurationSorter.java:78) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.getInPriorityOrder(AutoConfigurationSorter.java:68) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector$AutoConfigurationGroup.sortAutoConfigurations(AutoConfigurationImportSelector.java:478) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector$AutoConfigurationGroup.selectImports(AutoConfigurationImportSelector.java:463) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGrouping.getImports(ConfigurationClassParser.java:882) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:809) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorHandler.process(ConfigurationClassParser.java:780) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:192) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:331) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:247) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:112) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:748) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[spring-boot-2.7.11.jar:2.7.11] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.11.jar:2.7.11] at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.7.11.jar:2.7.11] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) ~[spring-boot-2.7.11.jar:2.7.11] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) ~[spring-boot-2.7.11.jar:2.7.11] at com.weborama.zalandospringcloudissue.Application.main(Application.java:10) ~[classes/:na]
When adding Zalando problem-spring-web dependency to a project using Spring boot 2.7 and Spring Cloud 3.1, an error occurs
Description
Consider the following dependencies:
If you run an app with these, the app will fail to start, and show the following error:
java.lang.IllegalStateException: AutoConfigure cycle detected between org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration and org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration
Expected Behavior
Spring Boot should start correctly.
Actual Behavior
Spring fails to start, and shows the following error:
java.lang.IllegalStateException: AutoConfigure cycle detected between org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration and org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration at org.springframework.util.Assert.state(Assert.java:97) ~[spring-core-5.3.27.jar:5.3.27] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.checkForCycles(AutoConfigurationSorter.java:101) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:91) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.doSortByAfterAnnotation(AutoConfigurationSorter.java:93) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.sortByAnnotation(AutoConfigurationSorter.java:78) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationSorter.getInPriorityOrder(AutoConfigurationSorter.java:68) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector$AutoConfigurationGroup.sortAutoConfigurations(AutoConfigurationImportSelector.java:478) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector$AutoConfigurationGroup.selectImports(AutoConfigurationImportSelector.java:463) ~[spring-boot-autoconfigure-2.7.11.jar:2.7.11] at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGrouping.getImports(ConfigurationClassParser.java:882) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:809) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorHandler.process(ConfigurationClassParser.java:780) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:192) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:331) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:247) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:112) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:748) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564) ~[spring-context-5.3.27.jar:5.3.27] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:731) ~[spring-boot-2.7.11.jar:2.7.11] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.11.jar:2.7.11] at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) ~[spring-boot-2.7.11.jar:2.7.11] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) ~[spring-boot-2.7.11.jar:2.7.11] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) ~[spring-boot-2.7.11.jar:2.7.11] at com.weborama.zalandospringcloudissue.Application.main(Application.java:10) ~[classes/:na]
Steps to Reproduce
Clone the following project: https://github.com/elewis-weborama/zalando-spring-cloud-issue
Launch the app and notice the error message.
Then remove the zalando dependency from the pom.xml and launch the app again. It should start successfully this time.
Your Environment
The text was updated successfully, but these errors were encountered: