spring-boot - Spring Batch multiple DataSourcees
问题描述
In Spring Batch, I can inject a DataSource in
@Configuration
public class DbConfiguration {
....
@Autowired
public DataSource dataSource;
With a bunch of properties in my Application.properties
spring.datasource.driverClassName=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/learning_spring_batch
spring.datasource.username=root
spring.datasource.password=waterside
spring.datasource.platform=mysql
spring.datasource.continueOnError=false
What happens if I want multiple Datasources?
For example, 1 for my source, 1 for my target and 1 for my Spring batch tables, is that possible? Also, if I want to specify specific schemas for any of the Datasources how do I do that? Thanks
解决方案
推荐阅读
- ssis - 如何使用 SSIS sql 执行任务在 Teradata 上调用存储过程?
- cytoscape.js - Cyotoscape.js 可乐扩展类似于可乐示例
- java - 如何根据 Select 查询的结果更新 TextView 中的文本
- java - 如何更新 Jre 中的时区设置?
- python - 通过python发送电子邮件时出现SMTPServerDisconnected错误
- spring - 创建隐式JWT时的Spring Boot OAuth2?
- mysql - 从先前查询的结果中提取最新版本的文章
- r - 从 r 中的另一个数据框中查找值
- visual-studio - 云服务项目不再加载
- r - 从单独的 data.frame r 将 docvars 添加到 dfm