Refine `BasicErrorController` mappings so that only JSON and XML get
structured responses. A simple string response is returned for all
other media types.
Fixes gh-12513
This commit fixes a NPE when the static-locations array of
`ResourceProperties` has to be expanded as the setter is cleaning the
values of the array and is affected by a non-intuitive behaviour of the
binder.
When the binder needs to set an element of an array and the size of the
array isn't large enough, the binder proceeds as follows:
* An array of the required size is created
* The content of the original array is copied over
* The setter of the property is invoked with the new array
* The setter of the property is invoked and the returned array is
mutated to set the requested value
While one would expect the array to contain the requested value when the
setter is invoked, this is not the case. Also, the array might contain
null values if a value at index 8 should be set and the array has a size
of 3.
All in all, `ResourceProperties#appendSlashIfNecessary` has to account
for `null` and an additional round of cleaning has to happen once
binding has completed.
Closes gh-12360
This commit updates all `toLowerCase()` and `toUpperCase` invocations to
use the variant that takes a `Locale` to avoid locale-specific side
effect.
Closes gh-12213
Previously, we removed the Connectors from Tomcat's Service before
the Context was started. The removal of the Connectors is required as
it prevents Tomcat from accepting requests before we're ready to
handle them.
Part of starting the Context is creating and initializing the
ServletContext. ServerProperties uses a ServletContextInitializer to
set the session tracking modes and Tomcat rejects the SSL tracking
mode if there is no SSL-enabled connector available. With the previous
arrangement this led to a failure as the Connectors had been removed
so the SSL-enabled connector could not be found.
This commit updates the embedded Tomcat container to defer the
removal of the Connectors until after the context has been started
but still at a point that is before the Connectors themselves would
have been started.
Closes gh-12058
This commit makes sure that properties-based resource bundle location
with a dot is detected. It also harmonizes the description of the
configuration key as our support is not stricly matching the convention.
Closes gh-10092
jOOQ auto-configuration will make use of a PlatformTransactionManager
bean if available. This commit ensures that jOOQ is auto-configured
after transaction auto-configuration, thereby ensuring that any
auto-configuration PlatformTransactionManager bean can be consumed.
Closes gh-11052
The JobLauncherCommandLineRunner reassigned method arguments inside the
merge method. Instead of reassigning the method argument just return
the new instance directly.
Also some minor cleanup (unnesseccary null check and continue keyword).
Closes gh-10612
Previously, if a user's configuration class provided a custom
Validator bean, that configuration class would be initialized very
early so that the Validator could be used to create the
auto-configured MethodValidationPostProcessor. This early
initialization could problems as it may prevent any of the
configuration class's dependencies from being post-processed.
This commit updates the injection of the Validator bean to be lazy,
thereby preventing the creation of the auto-configured
MethodValidationPostProcessor from triggering early initialization.
Closes gh-9416