Spring Batch doesn't use custom datasource to create tables

后端 未结 1 1816
[愿得一人]
[愿得一人] 2021-01-14 08:29

I am working on REST-service (with Spring boot), which runs batch job. I want Batch to work only with embedded datasource (to store metadata), while default datasource (Pos

相关标签:
1条回答
  • 2021-01-14 08:46

    Using Spring Boot the DataSource that is used by the BatchDataSourceInitializer is, unfortunately, not related to the BatchConfigurer. It just grabs the default DataSource in the context. If you configure your own BatchDataSourceInitializer, the Boot one won't kick in and you can define which DataSource is used directly.

    0 讨论(0)
提交回复
热议问题