![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mybatis-plus
时而有事儿
这个作者很懒,什么都没留下…
展开
-
springBoot+mybatisPlus+druid 实现多数据源+分页
MybatisPlusConfig.java,这个需要注意两个地方,更改类上面的@MapperScan注释,改成对应数据源的mapper路径,更改sqlSessionFactory方法的mapper.xml文件路径。DataSourceAspect.java,需要注意,这里就是mapper.java文件对应数据源的地方,更改@Pointcut里的mapper路径。再修改yml文件,即可使用多数据源,访问对应mapper自动切换数据源,无需其他设置。其他就是基本了,自己写了,难得上传了。原创 2023-03-23 16:48:46 · 1210 阅读 · 0 评论 -
SpringBoot+Mybatis-Plus 简单的实列 入门教程
【代码】SpringBoot+Mybatis-Plus 简单的实列 入门教程。原创 2022-10-10 15:28:21 · 82 阅读 · 0 评论