springboot 集成mybatisPlus 时,@MapperSan注解配置问题

  • Post author:
  • Post category:其他


@MapperSan("com") 

不指定mapper 包具体位置,会导致 service(继承ServiceImpl) 自定义的方法使用报错

@Autowired
private SysUserService sysUserService; 
。。。
SysUser sysUser = sysUserService.getByUsername(username);


报错绑定问题:


Caused by: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.ye.modules.sys.user.service.SysUserService.getByUsername

@MapperSan("com.**.mapper") 


指定mapper 包具体位置,就不会有这个问题



版权声明:本文为qq_17586173原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。