SpringBoot多数据源中使用mybatis-plus出现I
2020-02-11 本文已影响0人
风雨兼程_ad4d
在springboot项目中应为配置了多数据源,然后引入mybatis-plus的配置,发现并没有生效,查询的时候使用selectById这种内置方法直接报 Invalid bound statement (not found) ,通过查找mybatis-plus官方文档得知,不能使用原生的 SqlSessionFactory,正好项目里面配置的是原生的

改成使用MybatisSqlSessionFactoryBean来获取就可以了

然后springboot启动日志成功打印出mybatis-plus的banner

