问题
I'm trying to replace some projects to use Spring Data JDBC
instead of using JdbcTemplate
.
Now, I'd like to use it for multiple DataSource
s, how can I configure it in Spring Data JDBC?
回答1:
There is currently no support for working with two or more DataSource
s. You'd have to manually redo what the JdbcRepositoryFactoryBean
does.
来源:https://stackoverflow.com/questions/49914310/how-to-configure-multiple-datasources-in-spring-data-jdbc