Skip to content

Actuator endpoint with Springdoc circular references #3111

Closed
@aeiplatform

Description

@aeiplatform

Describe the bug
Based on documentation Actuator API
management.endpoint.gateway.enabled=true # default value which is not
Enabling gateway actuator endpoint leads to circular dependecy.

I even encoutered working behavior with additional Oauth2 client dependency in Gateway, but only with allow-circular-references: true.
For this example even allowing circular reference is not helping.

Is there any workarount to get such a combination working?

Log

***************************
APPLICATION FAILED TO START
***************************

Description:

The dependencies of some of the beans in the application context form a cycle:

???????
|  gatewayControllerEndpoint defined in class path resource [org/springframework/cloud/gateway/config/GatewayAutoConfiguration$GatewayActuatorConfiguration.class]
?     ?
|  modifyRequestBodyGatewayFilterFactory defined in class path resource [org/springframework/cloud/gateway/config/GatewayAutoConfiguration.class]
?     ?
|  org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration$EnableWebFluxConfiguration
?     ?
|  swaggerWebFluxConfigurer defined in class path resource [org/springdoc/webflux/ui/SwaggerConfig.class]
?     ?
|  actuatorProvider defined in class path resource [org/springdoc/webflux/core/configuration/SpringDocWebFluxConfiguration$SpringDocWebFluxActuatorConfiguration.class]
?     ?
|  webEndpointReactiveHandlerMapping defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/reactive/WebFluxEndpointManagementContextConfiguration.class]
???????


Action:

Despite circular references being allowed, the dependency cycle between beans could not be broken. Update your application to remove the dependency cycle.

Sample

I tried to minimize this issue with Spring Initializr
demo.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions