I want to use a different schema to save Spring Batch tables. I can see that my new datasource in set in the JobRepositoryFactoryBean
. But still the tables are
When using Spring Batch's @EnableBatchProcessing
, the DataSource
used by the Spring Batch tables is the one provided by the BatchConfigurer
. If you are using more than one DataSource
in your application, you must create your own BatchConfigurer
(either by extending DefaultBatchConfigurer
or implementing the interface) so that Spring Batch knows which to use. You can read more about this customization in the reference documentation here: https://docs.spring.io/spring-batch/4.0.x/reference/html/job.html#configuringJobRepository