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.
Configuring a job repository
- [Instructor] Spring batch uses the job repository to store metadata about the execution of a batch job. Up until this point, this metadata was stored in an in-memory H2 database. This isn't very useful since we'll lose the metadata with every execution of a job. In this lesson, we're going to set up our job repository to connect to our MySQL database. That way, we can store the metadata regarding our job executions persistently across different runs of jobs. So in order to do that, we need to add a new dependency into our palm.xml file, and that dependency is going to be for the MySQL database driver. Now Currently, we have the H2 database configured, we're just going to reuse that dependency section to set up our MySQL driver, and we'll remove H2 in the process. So anytime we're using a Maven dependency, we need a group ID. In this case, it's going to be mysql. And we also need an artifact ID. In this case, it's…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Spring Batch architecture5m 28s
-
Configuring a job repository6m 13s
-
Job parameters6m 59s
-
Building jobs with multiple steps5m 26s
-
Restarting jobs5m 19s
-
Job flow5m 11s
-
Building conditional flows6m 48s
-
Controlling flow with custom statuses6m 59s
-
Challenge: Creating a conditional flow1m 20s
-
Solution: Creating a conditional flow6m 35s
-
-
-
-
-
-
-
-