This commit introduces a DefaultEnablement enum that replaces the
"enabledByDefault" boolean flag of Endpoint. This allows to better
control what indicates the default enablement of an endpoint.
With DefaultEnablement#ENABLED, the endpoint is enabled unless an
endpoint specific property says otherwise. With DefaultEnabled#DISABLED,
the endpoint is disabled unless an endpoint specific property says
otherwise. DefaultEnablement#NEUTRAL provides a dedicated option to
indicate that we should resort to the default settings in absence of
a specific property.
See gh-10161
Restructure actuator packages to improve structure. The following
changes have been made:
- Separate actuator and actuator auto-configuration into different
modules.
- Move endpoint code into `spring-boot-actuator`.
- Move `Endpoint` implementations from a single package into
technology specific packages.
- Move `HealthIndicator` implementations from a single package into
technology specific packages.
- As much as possible attempt to mirror the `spring-boot` package
structure and class naming in `spring-boot-actuator` and
`spring-boot-actuator-autoconfigure`.
- Move `DataSourceBuilder` and DataSource meta-data support from
`spring-boot-actuator` to `spring-boot`.
Fixes gh-10261
Previously, if a health's details contained a key named status (either
because an indicator bean was named statusHealthIndicator or an
indicator added an entry named status to its details) this would
clash with the health's own status as the details were serialized as
siblings of the status field.
This commit updates Health to remove @JsonAnyGetter from getDetails().
This means that all of a Health's details will now be nested within
a separate details field, thereby preventing a possible clash with
the status field.
Closes gh-10249
This commit removes the restriction that was added in 4a61e45 to
prevent / from being used as the management context path when the
management context was not using a different port
The management context path can now be set to / irrespective of the
configuration of the management port. To avoid a possible clash
with the application's welcome page or similar, the links "endpoint"
that is mapping to the management context path is disabled when
the management context path is /.
As part of allowing / to be used as the management context path again,
the handling of endpoint mappings and the creation of paths for
individual operations has been consolidated into a new EndpointMapping
class that is used across the three (MVC, WebFlux, and Jersey)
implementations.
See gh-9898
This commit introduces a "ReactiveHealthIndicator" contract that can be
implemented for health checks against a reactive API.
When running in a WebFlux-based web app, the health and status endpoints
transparently use this in a WebFlux-based application and regular
HealthIndicator are executed on the elastic scheduler.
When running in a Servlet-based web app, the endpoints includes and
adapts available ReactiveHealthIndicators automatically
Closes gh-7972