SpringBoot+MyBatis-Plus+Oracle实现多数据源配置

1.pom.xml文件增加
在这里插入图片描述
2.application.yml配置
在这里插入图片描述master为主数据源secondary为第二数据源

3.pojo文件配置
在这里插入图片描述
3.mapper文件配置,@DS(“secondary”)指定了第二数据源取数据
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_44812604/article/details/127386828
今日推荐