1:

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.example.myspringboot.dao.AyUserDao.findByNameAndPassword

这是因为namespace的问题  一定要写正确的路径名,当然了 ,也不能写错了 MyBatis 遇到的报错

 

2:

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Error instantiating interface com.example.myspringboot.dao.AyUserDao with invalid types () or values (). Cause: java.lang.NoSuchMethodException: com.example.myspringboot.dao.AyUserDao.<init>()

这是因为 resultMap的type属性一定要写成你的实体类名  不要写成接口名  

错误实例:

MyBatis 遇到的报错

正确的:

MyBatis 遇到的报错

 

相关文章:

  • 2021-11-23
  • 2022-12-23
  • 2022-01-24
  • 2021-05-27
  • 2021-04-24
  • 2022-01-31
  • 2022-01-18
  • 2021-10-13
猜你喜欢
  • 2022-02-20
  • 2021-06-27
  • 2021-11-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2021-10-25
相关资源
相似解决方案