This commit allows EntityManagerFactoryBuilder to provide the JPA
properties to use according to the DataSource used to build the
EntityManagerFactory. Previously the JPA properties were computed only
once based on the primary data source, which was a problem since its
default DDL setting may be different.
EntityManagerFactoryBuilder takes a function that provides the JPA
properties based on a data source, rather than the properties
themselves. Constructors with the previous variant have been deprecated
as a result.
Closes gh-44516
This commit deprecates setObservationRegistry on
DefaultJmsListenerContainerFactoryConfigurer as it should not have been
made public in the first place. We want to make sure users don't
accidentally use it, and move it back to a package private method once
the deprecation period has run its course.
Closes gh-44466
Removed in favor of WebServerFactoryCustomizerBeanPostProcessorTests
which, through the expectations that it sets up on the mock bean
factory, already checks that early initialization will not be
triggered.
Closes gh-44511
This commit updates H2ConsoleAutoConfiguration to consider non-default
data sources when logging connection URLs.
See gh-44293
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
Prior to this commit, a change in gh-43586 unlocked the support for
symlinks: instead of watching the link itself which might never change,
this would watch the target file which is likely to change.
This could break with an `IllegalStateException` in case the symlink is
using a path relative to the link itself.
This commit ensures that the target is resolved against the current
link path to avoid incorrect watch operations.
Fixes gh-43966
Before this commit, only a single ResourceHandlerRegistrationCustomizer
was invoked. This commit adds functionality to have more
than one ResourceHandlerRegistrationCustomizers
See gh-43494
Restore `buildConsumerProperties()` and `buildProducerProperties()`
methods in `KafkaProperties` to make it more convenient to use them
without an SSL bundle.
Fixes gh-43300
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
Update `SslAutoConfiguration` to the `ApplicationContext` class loader
when loading SSL resources. Prior to this commit, the thread context
class loader was used to load resources which could be incorrect.
Specifically, when using a `ForkJoinPool` the thread context classloader
defaults to the JRE `AppClassLoader` which does not include uber jar
content.
The underlying `JksSslStoreBundle` class and `PemSslStore.load(...)`
method have been updated so support using a provided `ResourceLoader`.
Fixes gh-42468