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

Missing documentation on how to set up JSR-303 method validation [SPR-11473] #16098

Closed
spring-issuemaster opened this issue Feb 22, 2014 · 0 comments
Assignees
Milestone

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Feb 22, 2014

Abhijit Sarkar opened SPR-11473 and commented

The part of the reference manual that talks about integration with JSR-303 conveniently omits two things, without which BV does not kick in.

  1. A MethodValidationPostProcessor needs to be configured in addition to the LocalValidatorFactoryBean.
  2. The class to be validated must have a @Validated annotation on it else methods are NOT searched for inline constraint annotations.

This just caused me 6 hours of debugging and hair tearing where I did everything the doc said but BV would simply not kick in. I finally had to debug through the Spring source code to understand this. There got to be an easier way and I can't be the only one who had this problem.


Affects: 4.0.2

Reference URL: http://docs.spring.io/spring/docs/4.0.x/spring-framework-reference/html/validation.html

Referenced from: commits 9af7d26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.