-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Closed
Description
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.
- A MethodValidationPostProcessor needs to be configured in addition to the LocalValidatorFactoryBean.
- 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
Metadata
Metadata
Assignees
Labels
type: documentationA documentation taskA documentation task