June 2014
Beginner to intermediate
304 pages
7h 25m
English
You need to write the previous bean validations again in a classic Spring-based validation, which is not a good idea, but thanks to the flexibility and extensibility of Spring validation, you can combine both a Spring-based validation and bean validation together with a little extra code. Perform the following steps:
ProductValidator under the com.packt.webstore.validator package in the source folder src/main/java. Then, add the following code into it:package com.packt.webstore.validator; import java.util.HashSet; import java.util.Set; import javax.validation.ConstraintViolation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.Errors; ...