Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose SpringValidatorAdapter contained in ValidatorAdapter via new SmartValidator method #37081

Closed
rstoyanchev opened this issue Aug 23, 2023 · 1 comment
Assignees
Labels
status: superseded An issue that has been superseded by another type: enhancement A general enhancement

Comments

@rstoyanchev
Copy link
Contributor

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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 23, 2023
@snicoll snicoll added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 23, 2023
@snicoll snicoll added this to the 3.2.0-M3 milestone Aug 23, 2023
zpavloudis added a commit to zpavloudis/spring-boot that referenced this issue Aug 28, 2023
@wilkinsona wilkinsona self-assigned this Aug 30, 2023
zpavloudis added a commit to zpavloudis/spring-boot that referenced this issue Aug 30, 2023
zpavloudis added a commit to zpavloudis/spring-boot that referenced this issue Aug 31, 2023
zpavloudis added a commit to zpavloudis/spring-boot that referenced this issue Aug 31, 2023
zpavloudis added a commit to zpavloudis/spring-boot that referenced this issue Sep 4, 2023
zpavloudis added a commit to zpavloudis/spring-boot that referenced this issue Sep 4, 2023
@wilkinsona
Copy link
Member

Closing in favor of #37119.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Sep 11, 2023
@wilkinsona wilkinsona added the status: superseded An issue that has been superseded by another label Sep 11, 2023
@wilkinsona wilkinsona removed this from the 3.2.0-M3 milestone Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another type: enhancement A general enhancement
Projects
None yet
4 participants