其他分享
首页 > 其他分享> > @MapperScan和mybatis-plus.mapper-locations

@MapperScan和mybatis-plus.mapper-locations

作者:互联网

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

  1. @MapperScan
// 可以配置不同的扫描地址,主要是来扫描 apper接口的也就是dao类,
@MapperScan({"com.xx.xx.mapper","com.xx.xx.mapper"})
  1. mybatis-plus.mapper-locations
#配置mapper xml文件的路径(扫描mapper文件下的xml)
mybatis-plus.mapper-locations=classpath:com/xx/xx/mapper/xml/*.xml

标签:xml,mapper,locations,MapperScan,mybatis,xx
来源: https://blog.csdn.net/weixin_42264266/article/details/117738942