Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spring batch admin into existing spring batch project

I am using spring batch to parse my files. I want to use spring Batch Admin for job inspection, job launching, job execution. Spring Batch Admin uses HSQLDB database, which is initialized on start up. My spring batch project uses its own database which includes the appropriate tables for spring batch:

  1. BATCH_JOB_INSTANCE
  2. BATCH_JOB_PARAMS
  3. BATCH_JOB_EXECUTION
  4. BATCH_STEP_EXECUTION
  5. BATCH_JOB_EXECUTION_CONTEXT
  6. BATCH_STEP_EXECUTION_CONTEXT
  7. BATCH_STEP_EXECUTION_SEQ
  8. BATCH_JOB_EXECUTION_SEQ
  9. BATCH_JOB_SEQ

In my database also are included some else tables which are used from my project.

I want Spring Batch Admin to use the upper tables of my database instead of its own database. Is there any way to do that?

like image 239
pbal Avatar asked Aug 15 '26 15:08

pbal


1 Answers

Looks like I am late in responding but still, in case somebody still looks for an answer to this. Yes, to make Spring Batch Admin use the same database, place your datasource configuration properties under src/main/resources/META-INF/default-properties. Also, to make it load your context, a context configuration file needs to be placed under src/main/resources/META-INF/spring/batch/servlet/override/. Placing of files to override those that come by default with Spring Batch Admin is important as it looks for files in a certain hierarchy. The following article could also be looked into to have a working example. http://examples.javacodegeeks.com/enterprise-java/spring/spring-batch-admin-tutorial/

like image 117
5122014009 Avatar answered Aug 19 '26 21:08

5122014009



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!