首页 > 其他分享 >Mapper that could not be found

Mapper that could not be found

时间:2023-01-07 14:07:51浏览次数:46  
标签:Mapper mapper 数据源 could 扫描 MapperScan found classpath HisDruidConfig

现象1 mapper 资源扫不到

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

Mapper that could not be found_启动项


Mapper that could not be found_xml_02


Mapper that could not be found_xml_03

现象2 缺少配置文件 HisDruidConfig

​​SpringBoot 配置多数据源​​

现象3 没有启动添加扫描

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

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



标签:Mapper,mapper,数据源,could,扫描,MapperScan,found,classpath,HisDruidConfig
From: https://blog.51cto.com/u_15116285/5995468

相关文章