Question

I am confused that if spring validation just supports the jsr 303 or spring validation is a implementation of jsr 303 like hibernate-validator or apache-validator

Était-ce utile?

La solution

Spring does not provide implementation but as per Spring "With JSR-303, a single javax.validation.Validator instance typically validates all model objects that declare validation constraints. To configure a JSR-303-backed Validator with Spring MVC, simply add a JSR-303 Provider, such as Hibernate Validator, to your classpath. Spring MVC will detect it and automatically enable JSR-303 support across all Controllers"

More details ca be found at http://docs.spring.io/spring/docs/3.0.x/spring-framework-reference/html/validation.html#validation-mvc-jsr303

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top