application上配置了@MapperScan(扫面mapper类的路径)l后,配置mapper-locations没有意义。
如果mapper类和mapper.xml不在同一个路径下,mapper-locations就有用了,我们就在application.yml中配置mybatis: mapper-locations: classpath:cn/wenham/student/org/mapper/*.xml
mybatis mapper-locations作用
最新推荐文章于 2024-06-09 18:01:12 发布