Spring Batch tables are not automatically created with multiple datasources using Spring Boot #4612
-
|
I've read spring-projects/spring-boot#33526 and am using spring:
batch:
job:
# Don't run job on application startup
enabled: false
jdbc:
initialize-schema: alwaysI've got multiple datasources and one is marked as There's no error message so I don't know to debug it. How can I find out, what I'm missing? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
|
Have you annotated the datasource to use for Spring Batch with |
Beta Was this translation helpful? Give feedback.
-
|
Do not add @EnableBatchProcessiong Annotation when you have disabled job on startup. |
Beta Was this translation helpful? Give feedback.
-
|
The Batch meta-data table creation is a Spring Boot feature, not a Spring Batch feature. So this question is rather for Spring Boot, but no problem I think I answered it above. If you have further questions about the Batch support in Spring Boot, please ask in the Spring Boot project and cc me, and I will be happy to help there. |
Beta Was this translation helpful? Give feedback.
From the Javadocs, I understand that this annotation should be used if there is another datasource marked as primary, which is your case IIUC.