Skip to content

Expose SpringValidatorAdapter contained in ValidatorAdapter via new SmartValidator method #37081

Closed as not planned
@rstoyanchev

Description

@rstoyanchev

ValidatorAdapter wraps SpringValidatorAdapter to expose it as a SmartValidator, and not as jakarta.validation.Validator to avoid competing with other jakarta.validation.Validator beans. This works fine since Sping MVC and WebFlux primarily need a Spring Validator. However, for the built-in method validation in 6.1, Spring MVC and WebFlux need the jakarta.validation.Validator and as a result the built-in method validation feature does not work currently with Boot autoconfig. See spring-projects/spring-framework#31082.

To address this, we are adding a new unwrap method on SmartValidator, and we'll need ValidatorAdapter to implement it to allow Spring MVC and WebFlux to unwrap ValidatorAdapter and access the validator instance it contains.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions