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.

Reading from databases in single-thread scenarios

Reading from databases in single-thread scenarios

From the course: Spring: Spring Batch

Start my 1-month free trial

Reading from databases in single-thread scenarios

- [Instructor] Reading data from a database is another common requirement in batch jobs. Within Spring Batch, there are several out of the box item readers that make it easy to read from a relational database. These out of the box implementations include item readers for JDBC cursors, hibernates, stored procedures and JDBC paging. In this lesson, we'll explore the JDBC cursor item reader which is suitable for reading data in single-threaded scenarios. Within the data directory found in your working files, you'll find the shipped_order.sql file. If we open this file, you'll see that it contains the DDL to generate a shipped order table and then the insert statements to populate that table. I've already executed this script within my mySQL database and you'll notice that I have the shipped order table in place. You'll want to position this table and the data before we begin this lesson. In order to read data from a…

Contents