mybatis
王俊超_
这个作者很懒,什么都没留下…
展开
-
Could not write JSON: No serializer found for class *** and no properties错误
场景:使用RestController或者Controller注解将查询的实体装换成json字符串时报错。 原因:需要装换的对应实体类的属性缺少:getter和setter方法,导致将实体类装换的json格式类无法读取对应的属性从而报错。 解决方法:在需要装换的是实体类中给属性加上getter和setter方法(或者使用:lombok插件给实体类加上:Getter和Setter注解) 拓展:错误信息为:Request processing failed; nested exception is java.l转载 2020-11-03 19:58:50 · 548 阅读 · 0 评论 -
updateByPrimaryKeySelective和updateByPrimaryKey区别
转载来源:https://blog.csdn.net/a670941001/article/details/54619432 int updateByPrimaryKeySelective(TbItem record);int updateByPrimaryKey(TbItem record); 上面的是逆转工程生成的Mapper接口 对应的xml为 <update id="转载 2020-10-29 17:35:58 · 163 阅读 · 0 评论