CachePublicMetrics wasn't explicitly tested and was still using field
injection. This commit improves the situation in preparation of the fix
for gh-8984
Update `ValidationAutoConfiguration` and `WebMvcAutoConfiguration` to
ensure as much as possible that only a single Validator bean of each
type is registered.
Validation auto-configuration now does the following:
- If no validator is found: Registers a `LocalValidatorFactoryBean`
(providing both Spring and JSR validation)
- If the user defines a Spring & JSR validator: Backs off
- If the user defines only a JSR validator: Adapts it to a Spring
validator (without exposing another JSR implementation)
WebMvcAutoConfiguration auto-configuration has been updated to make
MVC validation follow common Spring Boot patterns:
- If not validator beans are found (due to the user excluding
ValidationAutoConfiguration) a new `mvcValidator` bean will be
registered.
- If a single validator bean is found it will be used for MVC
validation.
- If multiple validator beans are defined it will either use the one
named `mvcValidator` or it will register a new `mvcValidator` bean
Any automatically registered `mvcValidator` bean will not implement
the JSR validator interface.
Finally, it is no longer possible to provide an MVC validator via a
`WebMvcConfigurer`.
Fixes gh-8495
Allow `PathExtensionContentNegotiationStrategy` to be bypassed by
actuator endpoints. Prior to this commit calling `/loggers/com.aaa.cab`
would return a HTTP 406 response due to `.cab` being a known extension.
Fixes gh-8765
This commit renames the `solrStatus` property of the Solr health indicator
to `status` and its type. This is now an integer corresponding to the
status Solr sent rather than a String that can be "OK" when all is well.
Closes gh-8878