Description
In the course of our implicit JDK proxy registration attempts in #28980, we got reminded that MethodValidationPostProcessor
was used with lazy Validator
initialization in Spring Boot: https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.java#L72
Due to the lack of lazy initialization support in MethodValidationPostProcessor
itself, Boot had to resort to @Lazy
with creates a lazy resolution proxy for the Validator
interface at dependency injection time. With explicit lazy resolution support through configuring an ObjectProvider<Validator>
on MethodValidationPostProcessor
, this should not be necessary and therefore not require a proxy hint anymore.