org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.lv.dao.UserDAO.quaryUser
at com.lv.test.TestUserDAO.testquaryUser(TestUserDAO.java:20)
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.lv.dao.UserDAO.quaryUser
Caused by: java.lang.IllegalArgumentException: Parameter Maps collection does not contain value for com.lv.dao.UserDAO.rmUser
问题分析
根本就没有配Parameter Maps
还写parameterMap
问题描述
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'name' in 'class com.lv.entity.User'
### The error may exist in com/lv/mapper/UserDAOMapper.xml
### The error may involve com.lv.dao.UserDAO.queryUser-Inline
### The error occurred while setting parameters
### SQL: select u.u_id,u.u_password,u.u_name,u.u_birthday,u.u_img,u.r_id from ems_User u where u_name=? and u_password=?
### Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'name' in 'class com.lv.entity.User'
Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'name' in 'class com.lv.entity.User'
问题分析
<selectid="queryUser"parameterType="User"resultMap="rmUser">
select u.u_id,u.u_password,u.u_name,u.u_birthday,u.u_img,u.r_id from ems_User u
where u_name=#{u_name} and u_password=#{u_password}
</select>
老师上课说#{}中不要有 _ 可能会报错
我为了避免这个错 写成name 根本不行
反而带 _ 的可以
问题描述
org.apache.ibatis.binding.BindingException: Type interfacecom.lv.dao.RoleDAO is not known to the MapperRegistry.