Invalid bound statement (not found): com.xxx.dao.xxxDao.selectByxx错误!!!!很简单
问题:在使用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