-
Notifications
You must be signed in to change notification settings - Fork 38.1k
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
Spring MVC and WebFlux method validation support that also adapts ConstraintViolation
s
#29825
Comments
Hi! I'm interesting in make some custom validations for the entire @RequestHeader, i was testing this issue and is not possible. It is planned to be included in further versions? |
Yes it is possible as indicated in the summary above, but the goal is to make it better integrated with Spring MVC and WebFlux, and easier to handle validation exceptions. If you need help to make it work as it is currently, this is not the right place. |
ConstraintViolation
s
This issue has been re-purposed to match the initial support in 6.1 M1, and the changes for that are now available in spring-context changes
Spring MVC and WebFlux changes Spring MVC and WebFlux have been updated to use Controller methods that have only |
I'm closing this issue as complete. Trying out the changes for 6.1 M1 with an actual application would be much appreciated. In case of feedback, please comment under the umbrella issue #30645, and we'll decide there how to proceed. Also subscribe to to watch the umbrella issue for further updates. |
This allows re-use of existing MethodParameter instances from controller methods with cached metadata, and also ensures additional capabilities such as looking up parameter annotations on interfaces. See gh-29825
Avoiding cycle between web.method.support and web.method.annotation packages. See gh-29825
Introduce support for method validation in Spring MVC and Spring WebFlux. This requires changes first at a lower level to enhance
MethodValidationInterceptor
infrastructure to adaptConstraintViolation
s toMessageSourceResolvable
errors, further aggregated into aBindingResult
for cascaded violations on Object method parameters.For the full scope of changes on this theme, see #30645.
The text was updated successfully, but these errors were encountered: