Unknown column ‘id’ in ‘where clause’

原因:我的是 id 在数据库表中没有匹配到相应字段。
Unknown column 'id' in 'where clause'解决办法:将id 改为 数据库表中对应的字段 emp_id

刚开始以为是其他原因:
1.mybatis-config.xml文件中配置要写对

Unknown column 'id' in 'where clause'如果配置写错,回报加载文件错误!

2.EmployeeMapper.xml
Unknown column 'id' in 'where clause'总结:
改bug需要用心,掉头发是不可避免滴!!!

相关文章: