yulichang / mybatis-plus-join

支持连表查询的mybatis-plus,mybatis-plus风格的连表操作提供wrapper.leftJoin(),wrapper.rightJoin()等操作
https://yulichang.github.io/mybatis-plus-join-doc/
Apache License 2.0
971 stars 113 forks source link

多数据源下,org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) #86

Closed wangzeyu135798 closed 6 months ago

wangzeyu135798 commented 7 months ago

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.github.yulichang.join.mapper.j.UserMapper.selectJoinList 多数据源的配置没有问题,mybatis-plus-join在但数据源也可以跑,但是把mybatis-plus-join放到多数据源下就总是报这个错,不知道该怎么解决。

yulichang commented 6 months ago

https://mybatisplusjoin.com/pages/problem.html#%E8%87%AA%E5%AE%9A%E4%B9%89sqlsessionfactory

xpluto commented 4 months ago

https://mybatisplusjoin.com/pages/problem.html#%E8%87%AA%E5%AE%9A%E4%B9%89sqlsessionfactory

多数据源场景需要配置多个SqlSessionFactory,不能去掉SqlSessionFactory

wangshengcheng commented 3 months ago

我也遇到了,多租户模式下,如果不用SqlSessionFactory,数据源切换不生效,如过使用SqlSessionFactory,则MyBatis-Plus-Join聊表查询无法使用。