Mapper that could not be found

现象1 mapper 资源扫不到

resources 建的是 目录 ,不是 package 所以如果直接 a.b 的方式创建,会扫描不到 mapper.xml 文件
image
image
image

现象2 缺少配置文件 HisDruidConfig

SpringBoot 配置多数据源

现象3 没有启动添加扫描

启动项缺少扫描 MapperScan
//@MapperScan(basePackages ={"com.iron.his.mapper"} ) -- 如果两个MapperScan 就需要 classpath: 改成 classpath*

这边多数据源,放到了 IronDruidConfig、HisDruidConfig 中处理

posted @ 2023-01-05 14:45  VipSoft  阅读(1180)  评论(0编辑  收藏  举报