Job Repository - Spring Batch Part 3
Spring Batch's Job Repository does the work of Scheduling and Interacting with Jobs. It also manages failures and reruns. As we saw in the previous blog, a Job can have multiple steps - Job Repository handles it all. It does all of the management using a few tables in the database. Till now, we have been using the h2 in-memory database - which actually creates a new instance of the db everytime we restart the application. Lets use standalone h2 db, so we can take a look at the tables involved and the data it holds. Git repo link: https://github.com/ricsr/spring-batch-demo/tree/exercise_03 Download H2 DB and open the console. Edit your application.properties with the following as reference: spring.datasource.url = jdbc:h2:tcp://localhost/~/test spring.datasource.driverClassName = org.h2.Driver spring.datasource.username = sa spring.datasource.password = test spring.jpa.database-platform = org.hibernate.dialect.H2Dialect Start your application. Once the application runs succes...