【发布时间】:2017-03-25 10:45:31
【问题描述】:
如果是,怎么做?
我正在编写一个存档项目,其中必须将一个数据库中的旧数据移动到另一个数据库。为此,我需要连接到 springboot 项目中的两个数据库。
任何指针将不胜感激。
【问题讨论】:
标签: postgresql spring-boot jdbctemplate
如果是,怎么做?
我正在编写一个存档项目,其中必须将一个数据库中的旧数据移动到另一个数据库。为此,我需要连接到 springboot 项目中的两个数据库。
任何指针将不胜感激。
【问题讨论】:
标签: postgresql spring-boot jdbctemplate
您需要提供两个不同的DataSources(两个不同的bean)。
看看http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-two-datasources
【讨论】: