Previously, default values for the following properties did not work:
- application.title
- application.formatted-version
- application.version
- spring-boot.formatted-version
- spring-boot.version
Instead of the default value, an empty string was used instead. For
example, ${application.title:Title} would be replaced with "" rather
than "Title" when the application title was unavailable.
This commit improves the ResourceBanner so that a placeholder's
default value is used. An empty string will still be used when no
default value is provided. For example, ${application.title} will
be replaced with "". As before, custom properties that are not
well-known will not be replaced at all. For example
${custom.property} will remain as-is in the printed banner when
the custom.property has not been set.
Fixes gh-44137
Previously, when Actuator expected to find multiple beans of the same
type, it used Map<String, Type> to inject them. Unfortunately, this
does not include beans that are not default candidates and there's
no way to request that autowiring includes such beans with Map-based
injection.
This commit switches from Map-based injection to querying the bean
factory for the desired beans. This is done using
SimpleAutowireCandidateResolver's new helper method,
resolveAutowireCandidates, that returns a Map<String, Type> of
beans including those that are not default candidates but excluding
those that are not autowire candidates.
Closes gh-43481
Previously, when health probes were enabled, the post-processor of
AutoConfiguredHealthEndpointGroups resulted in the bean no longer
implementing AdditionalPathMapper. This then caused a
ClassCastException when working with AdditionalPathMapper beans
in EndpointRequest's additional path mapping support.
This commit updates the type returned by the post-processor to
implement both HealthEndpointGroups and AdditionalPathMapper, as
AutoConfiguredHealthEndpointGroups does. Its implementation of
getAdditionalPaths produces a result that combines both the
additional paths of the original HealthEndpointGroups bean and its
own additional paths for the probes.
Fixes gh-44052