baomidou / dynamic-datasource

dynamic datasource for springboot 多数据源 动态数据源 主从分离 读写分离 分布式事务
https://www.kancloud.cn/tracy5546/dynamic-datasource/2264611
Apache License 2.0
4.74k stars 1.19k forks source link

请问调用mybatisplus Model里面的基础方法时,如何切换数据源? #297

Closed houxiaodong5 closed 4 years ago

houxiaodong5 commented 4 years ago

Enviroment

JDK Version(required): JDK1.8

SpringBoot Version(required): 2.2.2

dynamic-datasource-spring-boot-starter Version(required):2.2.0

druid Version(optional):

Describe

配置多数据源后,调用mybatisplus Model里面的基础方法时数据源无法切换,始终是固定的一个

Expected Result:

Actual Result:

Steps to reproduce

ls9527 commented 4 years ago

在失效的地方进去, 然后将调用栈发出来看一下

houxiaodong5 commented 4 years ago

已解决