From the course: Spring: Spring Batch

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

ItemProcessor Bean Validation

ItemProcessor Bean Validation

From the course: Spring: Spring Batch

Start my 1-month free trial

ItemProcessor Bean Validation

- [Instructor] The first item processor we'll take a look at is the bean validating item processor. This is a processor that Spring Batch provides out of the box. We can use it to validate the items read into a step. To determine if an item is valid, the bean validating item processor consults JSR 380 validation annotations placed on a bean. Let's take a look at how we can configure this item processor for validation within our batch job. We'll start out by taking a look at the Palm file for our project. You'll notice within the Palm that we've had to add some dependencies in order to support the JSR 380 annotations, so we added the hibernate validator, we added the EL API dependency as well as the EL dependency from Java EE, and then a jax B implementation from GlassFish. Those will need to be within your Palm, they're included within the working files for this lesson, so if you're starting out from those, you'll be fine.…

Contents