随笔分类 -  mybatis-plus

摘要:[toc] ## 表结构及数据 ```sql -- 表结构 CREATE TABLE IF NOT EXISTS user ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID', `username` varchar(30) DEFAULT 阅读全文
posted @ 2023-07-11 20:50 theSummerDay 阅读(177) 评论(0) 推荐(0) 编辑
摘要:# mybatis-plus切换数据源失败 ## 现象 多层数据源嵌套切换失败,本意是想查询H2数据源数据,但根据查询结果看,查询的是MySQL数据源 ## 问题代码 ### H2数据源操作 ```java //由于配置文件已经指定默认数据源是h2,所以这里没有加@DS @Service publi 阅读全文
posted @ 2023-07-11 20:49 theSummerDay 阅读(147) 评论(0) 推荐(0) 编辑
摘要:# spring-boot集成mybatis-plus [toc] ## 依赖 ``` text com.baomidou mybatis-plus-boot-starter 3.5.3.1 ``` ## 配置 ### application.properties文件 ``` text spring 阅读全文
posted @ 2023-07-08 18:08 theSummerDay 阅读(46) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示