mybatis报错:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'id' in 'class java.lang.Long'
xml中,sql如下:
select
dd.*
from
sys_mouldtype_device md,
sys_dict_data dd,
sys_device d
where
md.mouldtype_code = dd.dict_code
and md.device_id = d.id
<if test="id != null"> and d.id = #{id}</if>
将“id != null”改成“_parameter != null”就可以了。