From the course: Spring: Spring Batch

Unlock the full course today

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

Solution: Filtering batch data

Solution: Filtering batch data

From the course: Spring: Spring Batch

Start my 1-month free trial

Solution: Filtering batch data

(bright upbeat music) - [Instructor] So let's take a look at one solution to the challenge. I was able to solve the challenge by creating a new item processor. So I'm just going to open the new dialog, create a new class and I'm going to name this class free shipping item processor. And then this class is going to implement spring batches item processor interface. And within that interface we can supply two type arguments. Now this part is a little bit tricky. We're going to make this the last item processor within our chain. So it's actually going to receive a tracked order as input and then it's going to output, a tracked order as well. So once we specify those generics we can go ahead and hit finish. And here we see our new item processor implementation is created and we just need to provide some logic within this class that's going to set the free shipping boolean for those orders that do qualify. So the…

Contents