Prior to this change, the failure analysis for an invalid
configuration property value filtered out the configuration property
sources property source. This property source contains a "duplicate"
of all of the environment's other property sources but with
configuration property support (such as relaxed/fuzzy matching of
environment variables). This was done to prevent the reporting of
duplicates when a property was found in both the configuration
property sources property source and the "normal" property sources.
An unwanted side-effect of this was that fuzzy matching of
environment variables was lost so the origin of
com.example.some-property would be found in the environment variable
was COM_EXAMPLE_SOME_PROPERTY but would not be found if it was
COM_EXAMPLE_SOMEPROPERTY.
This commit addresses this side-effect by no longer filtering out
the configuration property sources property source. To then
prevent duplicates from being reported in the analysis, it instead
deduplicates things based on the origin of each property that's
found in the environment's property sources.
Fixes gh-43380
Update `SslAutoConfiguration` so that the used resource loader prefers
file based resolution when paths are specified without a prefix. This
restores the behavior found in Spring Boot 3.3.
The `ApplicationResourceLoader` has been updated with a new `get` method
that accepts a `preferFileResolution` parameter. Unfortunately, we can't
directly influence the resource returned by the delegate
`ResourceLoader` since we can't override `getResourceByPath(...)`.
Instead we check if the returned type was likely to have been created
by a call to that method. If so, we change it to a `FileSystemResource`.
This approach should hopefully work with `DefaultResourceLoader` and
subclasses.
Fixes gh-43274
The lowercase form of the endpoint ID needs to be used so that
relaxed matching of properties, as provided by
ConfigurationPropertySources, works as intended. Without this
change the id of the endpoint in a property had to be an exact
match of the endpoint's ID.
Closes gh-43302
Previously, customizers loaded from spring.factories were called
using LambdaSafe. This resulted in customizers with a generic type
more specific than Object being ignored. A customizer loaded from
the logging.structured.json.customizer property was not affected as
it was called directly rather than through LambdaSafe.
This commit aligns the way in which customizers loaded from
spring.factories are called with the way in which any customizer
specified using the logging.structured.json.customizer property is
called.
Closes gh-43312
Previously, when a configuration property name was created by
adapting a source with a value processor, creating sub names from
that property name did not work correctly. This broke binding of
prefixed environment variables to a map as the ancestor checking
did not work.
Fixes gh-43304