From the course: Spring: Spring Batch

Unlock the full course today

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

Configuring chunk-oriented steps

Configuring chunk-oriented steps

From the course: Spring: Spring Batch

Start my 1-month free trial

Configuring chunk-oriented steps

- [Instructor] In this lesson, we're going to create our first chunk-based step that contains a very simple item reader and item writer implementation. So, to get us started, I've created a simple job within our configuration. And that job contains one step, and it's the chunk-based step. Now, at the moment, this step isn't defined. So, we're going to go ahead and build that out using our step builder factory. We're going to name our step, chunk-based step. And then once we have provided a name for our step, we're going to use a different method. It's going to be the chunk method. And the chunk method requires us to supply two type arguments. And the type arguments signify the type of input to the chunk and the type of output. So, in this case, we're going to be Working with strings, and then we're able to call the chunk method. And the method itself accepts an argument that determines our chunk size. So, our chunk…

Contents