Let's implement a non-blocking batch process by following these steps:
- Create a Spring Boot 2.0 project, ch11-batch-async, that has the same starter POM dependencies with the same MySQL connection pool support and Spring OXM module.
- Create a bootstrap class that enables batch processing and task scheduling:
@EnableBatchProcessing @SpringBootApplication @EnableScheduling public class AsyncBatchBootApplication { public static void main(String[] args) throws Exception { SpringApplication.run(AsyncBatchBootApplication.class, args); } }
- In its src\main/\resources directory, create application.properties that contain the same configuration as the one in ch11-batch-sync. Just modify some server-related configurations.
- Copy