![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mybatis-generator
黑皮爱学习
爱学习,爱分享!
展开
-
mybatis-generator源码本地打包报错,跳过测试就好了
打开maven,选择m图标输入命令就能正常打包mvn clean install -Dmaven.test.skip=true原创 2020-12-08 15:06:59 · 273 阅读 · 0 评论 -
使用example查询分页失效,selectByExampleWithBLOBs导致分页失效
使用example查询分页失效,经过排查,是selectByExampleWithBLOBs导致的ResultSetFactoryExample example = new ResultSetFactoryExample();PageResult<ResultSetFactory> pageResult = new PageResult<>();ResultSetFactoryExample.Criteria criteria = example.createCriter.原创 2020-11-30 11:35:45 · 1771 阅读 · 0 评论 -
Idea设置Live Templates代码模板和模板变量使用,快速建立mybatis-generator的findOne方法
使用mybatis查询,经常会碰到类似下面这样的代码 public Waybill findByPhone(String name) { WaybillExample example = new WaybillExample(); example.createCriteria().andRoadNameEqualTo(name); List<Waybill> list = waybillMapper.selectByExample(ex原创 2020-11-23 10:57:42 · 476 阅读 · 0 评论 -
mybatis-generator生成的Example无法实现复杂关联查询时,可以使用@select查询示例
211原创 2020-06-30 09:48:11 · 1437 阅读 · 1 评论 -
使用mybatis-generator生成的Example,快速分页查询模板代码
controller接口/** * 分页列表查询 * * @param pageNum 页号 * @param pageSize 页面大小 * @param sortType 排序 * @return BaseResult */@GetMapping(value = "/getCustomerByPage")public BaseResult getCustomerByPage(@RequestParam("pageNum") Integer pageNum, @RequestPa原创 2020-06-22 19:49:06 · 2002 阅读 · 1 评论 -
使用mybatis-generator的分页查询selectByExampleWithBLOBs()报错,字段limitSize没有set方法
这是一个坑当数据库表有text字段的时候,要想查询出带有text字段数据的时候,就要使用带有BLOBs的方法,这本来是没问题的。但是在使用selectByExampleWithBLOBs()分页查询或者排序查询的时候,由于text字段的原因,selectByExampleWithBLOBs()分页排序查询会直接报错解决:正确的方法是先使用selectByExample()分页排序查...原创 2019-10-18 10:26:45 · 1185 阅读 · 0 评论