1. 首页
  2. 编程语言
  3. Java
  4. Springboot 扫描mapper接口的2种操作

Springboot 扫描mapper接口的2种操作

上传者: 2021-05-18 16:51:14上传 PDF文件 203.25 KB 热度 6次

方式一:在所有mapper接口使用@Mapper注解方式二:在springboot的启动类使用@MapperScan注解1、今天在做项目的时候报错(Invalid bound statement (not found):2、最后排查问题,总以为是contorller或者service层出的问题,仔细比较过后发现还是一样的效果,怎么改都报错。实在是自己粗心大意了。解决方法4、修改application文件中的mapper配置的路径就好!

下载地址
用户评论