Mybatis
BoomLee
boomlee.com ,大数据开发的百宝箱。RHCE认证,AWS SAP 认证,大数据工程师,从事医疗大数据行业
展开
-
Mybatis报错:There is no getter for property named 'id' in 'class java.lang.Long/String/Interger
There is no getter for property named 'id' in 'class java.lang.Long出现以上报错为Mybatis Mapper.xml文件有问题。案例DELETE FROM user WHERE <if test="id != null and id != ''"> id = #{id} &l...原创 2018-05-08 17:45:35 · 1287 阅读 · 0 评论 -
Mybatis 动态排序
1.应用场景不同字段,升序,降序2.解决方案 1.需要排序的表对应的实体类,添加两个字段 columnName sort 。一个是根据哪个列进行排序,一个是排序顺序,升序还是降序。2.mybatis xmlORDER BY <choose> <when test="columnName != null"> ${columnName} </w...原创 2018-06-05 11:05:40 · 6800 阅读 · 0 评论