When I am trying to implement actuator EndpointWebExtension for HealthEndpoint, it throws Error as
Caused by: java.lang.IllegalStateException: Found multiple extensions for the endpoint bean healthEndpoint
So Question is 1. Do Spring support multiple extension for Endpoint? 2. Do Spring supports extension for inbuild endpoint like HeathEndpoint or extension is only supported for Custom Actuator endpoints.
Comment From: wilkinsona
A single web extension is supported per endpoint. Spring Boot already auto-configures a HealthEndpointWebExtension for the health endpoint so you cannot provide an additional web extension for it. You can replace the auto-configured extension by providing your own bean that is a sub-class of HealthEndpointWebExtension as this will cause the auto-configured extension to back off.
If you have any further questions, please follow up on Stack Overflow or Gitter. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.
Comment From: StarReider
A single web extension is supported per endpoint. Spring Boot already auto-configures a
HealthEndpointWebExtensionfor the health endpoint so you cannot provide an additional web extension for it. You can replace the auto-configured extension by providing your own bean that is a sub-class ofHealthEndpointWebExtensionas this will cause the auto-configured extension to back off.If you have any further questions, please follow up on Stack Overflow or Gitter. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements.
I have similar issue with duplicates.
Caused by: java.lang.IllegalStateException: Unable to map duplicate endpoint operations: [web request predicate GET to path 'health' produces: application/vnd.spring-boot.actuator.v3+json,application/vnd.spring-boot.actuator.v2+json,application/json, web request predicate GET to path 'health/{*path}' produces: application/vnd.spring-boot.actuator.v3+json,application/vnd.spring-boot.actuator.v2+json,application/json] to healthEndpoint (healthEndpointWebExtension)
But in my case there is sub-class of HealthEndpointWebExtension:
@EndpointWebExtension(endpoint = HealthEndpoint.class)
public class HealthEndpointWebExtension extends org.springframework.boot.actuate.health.HealthEndpointWebExtension
Despite that fact spring tries to create auto-configured and custom HealthEndpointWebExtension.
Comment From: philwebb
@StarReider Our auto-configuration does use @ConditionalOnMissingBean so something unexpected must be going on. Could you please open a new issue and attach a sample project that replicates the problem.
Comment From: H3llK33p3r
Hello, same kind of issue on my side. Only @AutoConfigureOrder has solve the issue :(
Comment From: wilkinsona
@H3llK33p3r If you would like us to take a look, please open a new issue and attach a sample project that replicates the problem.