一个可能的原因:mybatis.mapperLocations 设置错误,classpath 后没有带 *。不带的话只扫描一个模块的 xml 文件。正确的是:
mybatis.mapperLocations: classpath*:mapper/**/*.xml
一个可能的原因:mybatis.mapperLocations 设置错误,classpath 后没有带 *。不带的话只扫描一个模块的 xml 文件。正确的是:
mybatis.mapperLocations: classpath*:mapper/**/*.xml