问题:在使用SpringMvc时,容易出现此问题:

Invalid bound statement (not found): com.xxx.dao.xxxDao.selectByxx错误!!!!很简单

原因分析:  

                                            (1)dao层的方法和mapper.xml中的方法不一样;

                                              (2)mapper中的namespace resultParameter 和对应的dao层entity层不一样

                                              (3)就是在mapper映射时,因返回值类型不一样

解决思路:
                              

                   (1)查看对应的返回类型,是不是在对应的Dao层里

                   (2)找到class为org.mybatis.spring.SqlSessionFactoryBean 这个bean

                   (3)找到name为mapperLocations的property

                
Invalid bound statement (not found): com.xxx.dao.xxxDao.selectByxx错误!!!!很简单

 

相关文章:

  • 2021-09-08
  • 2021-09-28
  • 2021-05-23
  • 2021-08-02
  • 2021-10-19
  • 2021-08-29
  • 2022-01-09
  • 2021-11-24
猜你喜欢
  • 2021-10-05
  • 2021-04-15
  • 2021-05-17
  • 2021-06-18
  • 2022-12-23
  • 2021-09-16
相关资源
相似解决方案