我想你会发现它有用
http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-two-datasources
它显示了如何定义多个数据源以及如何将其中一个分配为主数据源。
这是一个相当完整的示例,如果需要,还包含分布式事务。
http://fabiomaffioletti.me/blog/2014/04/15/distributed-transactions-multiple-databases-spring-boot-spring-data-jpa-atomikos/
您需要创建2个配置类,分离模型/存储库包等以简化配置。
同样,在上面的示例中,它手动创建数据源。您可以使用spring doc中带有@ConfigurationProperties批注的方法来避免这种情况。这是一个例子:
http://xantorohara.blogspot.com.tr/2013/11/spring-boot-jdbc-with-multiple.html
希望这些会有所帮助。



