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
This commit refines the optimization introduced in gh-39816 to only
unwrap our own caching connection factory. The more advanced unwrap
algorithm is still available, but opt-in only.
Unwrapping more aggressively may break use cases where the wrapped
ConnectionFactory is required, i.e. for transactional purposes.
Closes gh-43277
Update `AbstractApplicationContextRunner` and `Configurations` to
allow registration of beans with a specific generated bean name. By
default, no name is generated, however, `AutoConfigurations` has been
updated to use bean names using the fully qualified class name.
The update brings `ApplicationContextRunners` closer the behavior of
a standard Spring Boot application where user `@Configuration` classes
are usually registered with a simple name and auto-configurations are
imported (via an `ImportSelector`) using a fully qualified name.
Fixes gh-17963
Co-authored-by: Stéphane Nicoll <stephane.nicoll@broadcom.com>
Co-authored-by: Andy Wilkinson <andy.wilkinson@broadcom.com>
Co-authored-by: Dmytro Nosan <dimanosan@gmail.com>
Add `@Order` to `WebSocketMessageConverterConfiguration` so that custom
`WebSocketMessageBrokerConfigurer` implementations can be added before
or after ours.
Fixes gh-42924
Previously, if a bean name was a factory dereference its definition
would not be found. When the definition wasn't found it was assumed
that the bean was an autowire candidate and a default candidate.
If this, in fact, was not the case, @ConditionalOnMissingBean would
not match when it should have done and @ConditionalOnBean would
match when it should not had done.
This commit updates the bean-based conditions to correctly consider
factory beans so that whether or not they are a candidate can be
evaluated correctly.
Fixes gh-42970
Update `ClientHttpRequestFactoryBuilder` implementations to ensure
that all libraries have consistent redirect follow behavior. Following
of redirects is enabled by default.
The `ClientHttpRequestFactorySettings` may be used to change if
redirects should be followed. The `spring.http.client.redirects`
property may also be used to update the default behavior.
Closes gh-42879
Add a new `HttpClientAutoConfiguration` class that provides
`ClientHttpRequestFactoryBuilder` and `ClientHttpRequestFactorySettings`
beans and new configuration properties.
The existing `RestTemplate`, `RestClient` and `WebServiceTemplate`
auto-configurations have been updated to make use of the new
HTTP client support.
Users may now set `spring.http.client` property to globally change
the `ClientHttpRequestFactory` used in their application.
Closes gh-36266
Update `ApplicationResourceLoader` to support delegation to another
`ResourceLoader`. The update allows customer resource loaders to be
used when loading SSL resources.
Closes gh-42835