How to do it...

Let's now implement a blocking batch transaction that reads data from a database:

  1. Create a separate Spring Boot 2.0 application, ch11-batch-db, and add the same starter POM dependencies used in the previous recipe, emphasizing the spring-boot-starter-batch and spring-oxm.
  2. Create a bootstrap class inside its core package, org.packt.process.core, that enables batch processing:
@SpringBootApplication 
@EnableBatchProcessing 
public class BatchProcessBootApplication  { 
   // refer to sources 
} 
  1. Open the MySQL Workbench and create the following reg_employee database schema with the source table, employee, and destination table as permanent:
  1. Now, create application.properties in src\main\resources with an emphasis on reg_employee ...

Get Spring 5.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.