Spring Boot 3.3.3, mybatis 3.0.3.
遍寻全网,最后发现,是有一处代码的classpath路径问题.
原先的写法:
java
bean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath*:**/sqlmapdict/*.xml"));
需要修改为:
java
bean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath*:com/stone/highblue/space/sqlmapdict/*.xml"));
把路径填写完整