I have a spring boot batch application. In application.properties
, I specify my data source details as follows
spring.datasource.url=jdbc:jtds:sqlserver://1*.2**.6*.25:14**
spring.datasource.database=MYDB_DEV
spring.datasource.username=username
spring.datasource.password=password
The problem is, when I run the batch job, all user defined tables are taken from the MYDB_DEV. But Metadata tables like BATCH_JOB_EXECUTION, BATCH_JOB_EXECUTION_CONTEXT are taken from the MASTER schema even though I have created the same tables in MYDB_DEV. Why this happens? Is there any work around to make the application read Metadata tables from user defined schema?
I have debugged though the jobLauncher.run(myjob, jobParameters)
, Could not find any lead from where it is taking master Schema