為何account里面沒有g(shù)et?account是我自己的表對(duì)應(yīng)的實(shí)體類
rg.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'account' in 'class org.approval.entity.Account'
?? ?
Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'account' in 'class org.approval.entity.Account'
? ?
2017-03-15
解決了,應(yīng)該是a_name = #{aName} and a_password = #{aPassword} and a_enable = 1
2017-03-15
難道是我的xml配置錯(cuò)了?
<mapper namespace="org.approval.dao.AccountDao">
? ?<!--目的: 為DAO接口方法提供SQL-->
? ?<select id="queryByName" parameterType="Account" resultType="Account">
? ? ? ?select
? ? ? ? ?a_id,a_name,a_password,a_grade,a_enable
? ? ? ?from
? ? ? ? ?account
? ? ? ?where
? ? ? ? ?a_name = #{account.aName} and a_password = #{account.aPassword} and a_enable = 1
? ?</select>
</mapper>