
61

springboot配置多数据源-11854647-51CTO博客
source link: http://blog.51cto.com/11864647/2067708
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

在做项目的过程中难免会遇到这种情况:一个项目需要两个数据库中的数据,希望这篇文章能给遇到这些问题的小伙伴一点帮助第一步:将两个数据源的mapper接口和xml文件分别放入不同的文件夹下;第二步:在application.yml文件中加入双数据源,一定要指定主数据源,不然会报错spring: datasource: primar
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK