This content has been marked as final.
Show 1 reply
-
1. Re: BeanIO Reader with Validation
cfang Nov 17, 2019 10:49 PM (in response to richardmoore)sorry for the delay. I think what happens is the BeanIO's BeanReader reads a record, which returns an object, and this object is passed to the bean validation for checking constraints. So the validation part happens outside BeanIO's BeanReader's read method, and hence any BeanIO errorHandler will not have an effecet on bean validation errors. Basically, the errorHandler you're using in this case is a BeanIO construct, not one in batch/jberet.
For more details, you can check the source code of org.jberet.support.io.BeanIOItemReader