0
点赞
收藏
分享

微信扫一扫

@MapperScan和mybatis-plus.mapper-locations

小黑Neo 2022-03-25 阅读 39
java后端

项目截图
在这里插入图片描述

  1. @MapperScan

    // 可以配置不同的扫描地址,主要是来扫描 apper接口的也就是dao类,
    @MapperScan({“com.xx.xx.mapper”,“com.xx.xx.mapper”})

  2. mybatis-plus.mapper-locations

    #配置mapper xml文件的路径(扫描mapper文件下的xml)
    mybatis-plus.mapper-locations=classpath:com/xx/xx/mapper/xml/*.xml

举报

相关推荐

0 条评论