Mybatis报错no getter 和 Druid 报错injection violation, syntax error:
"Internal Server Error","message":"nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named '\*\*\*' in 'class com.\*\*\*.common.domain.\*\*\*\*\*\*\*\*\*\*DO'","path":"/\*\*\*\*\*/\*\*\*\*\*\*\*"
这个问题发生后 反复检查了mapper,发现没有任何问题, 后来检查了实体类发现是该属性的setter书写错误.
Error updating database. Cause: java.sql.SQLException: sql injection violation, syntax error: syntax error, error in :' `create\_time`, `updat',expect RPAREN, actual IDENTIFIER `create\_time` : insert into tb\_personal\_honor (`id`, `time`, `honor\_name`, `honor\_level`, **`issuing\_authority``create\_time`**,`update\_time`, `create\_person\_id`, `update\_person\_id`) values (?, ?, ?,?, ?, ?, ?, ?, ?)### SQL: insert into tb\_personal\_honor (`designer\_id`, `time`, `honor\_name`, `honor\_level`, `issuing\_athority` `create\_time`, `update\_time`, `create\_person\_id`, `update\_person\_id`) values (?, ?, ?, ?, ?, ?, ?, ?, ?)
expect RPAREN, actual IDENTIFIER来自Druid. 这个报错显示发生在 create_time字段, 考虑到不存在版本过低的问题, 实际仔细检查后发现issuing\_authority``create\_time
这里中间缺少一个逗号.