Closed
Description
Affects: 6.1.0-SNAPSHOT
#28990 added support for configuring MethodValidationPostProcessor
with a Supplier<Validator>
that would then be used to resolve the Validator
lazily. This laziness appears to have been lost as get()
is called on the Supplier
during afterPropertiesSet()
processing. The problem becomes apparent when upgrading Spring Boot to 6.1.0-SNAPSHOT as methodValidationPostProcessorValidatorDependencyDoesNotTriggerEarlyInitialization
in ValidationAutoConfigurationTests
fails.
The regression can be worked around by reverting spring-projects/spring-boot@639f980 but it leaves setValidationProvider
without a purpose. We'd also prefer not to have to use a lazy proxy in Boot.