Lazy Validator resolution in MethodValidationPostProcessor #28990
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
In the course of our implicit JDK proxy registration attempts in #28980, we got reminded that
MethodValidationPostProcessor
was used with lazyValidator
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#L72Due to the lack of lazy initialization support in
MethodValidationPostProcessor
itself, Boot had to resort to@Lazy
with creates a lazy resolution proxy for theValidator
interface at dependency injection time. With explicit lazy resolution support through configuring anObjectProvider<Validator>
onMethodValidationPostProcessor
, this should not be necessary and therefore not require a proxy hint anymore.The text was updated successfully, but these errors were encountered: