Mybatis 报错:There is no getter for property named 'device_no' in 'class
ibatis 报错:There is no getter for property named 'device_no' in 'class.xxx
。
报错位置为 mapper.xml
文件,sql 带入的参数变量找不到:
因为属性名称通常都是驼峰格式,而数据库字段多为下划线。所以这里的 #{device_no}
明显不是 CaseGpsInfo
中的属性,而应该是 deviceNo
。
修改之后问题解决。
本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。