Prior to this commit, `DataSourceJmxConfiguration` with tomcat
`DataSource`, it can only find `DataSourceProxy` if the given
`DataSource` is a direct child of it. Since it uses `instanceof`, it
could not find `DataSourceProxy` if the `DataSource` is
wrapped(delegated) or proxied.
This is because `DataSourceProxy#unwrap()` always returns null; thus
cannot use this method to directly obtain `DataSourceProxy`.
In this commit, updated the check logic to perform the best effort to
retrieve `DataSourceProxy`. If given `DataSource` is wrapped or proxied
by spring, tries to unwrap or get target datasource recursively to find
`DataSourceProxy`.
See gh-15206
Fix the `JobLauncherCommandLineRunner` to correctly deal with job
parameters when restarting a job.
Prior to this commit, we were was calling the `getNextJobParameters`
method of the `JobParametersBuilder` from batch. This method was getting
the previous parameters of the wrong job instance in a restart scenario.
This commit fixes the issue by first getting the right job instance with
the provided parameters, then restarting it.
Closes gh-14933
Fix `ResourceUrlEncodingFilter` conditions which were inadvertently
changed in commits 64f04fce and 6cc272ec and would back off if any
`FilterRegistrationBean` was found.
The updated conditions restores the behavior of Spring Boot 2.0.5 and
allows users to directly register their own `ResourceUrlEncodingFilter`
beans (as long as they don't use a `FilterRegistrationBean`).
Fixes gh-14897
Previously, the JSON-B auto-configuration would be enabled when the JSON-B API was
on the classpath. This led to a failure if there was no implementation available.
The JSON-B API loads an implementation using the service loader. This commit updates
the auto-configuration to be conditional on the presence of a
META-INF/services/javax.json.bind.spi.JsonbProvider file on the classpath.
Closes gh-14675