好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

spring boot--Mongdb排序分页

improt.org.springframework.data.domain.sort包 Criterial critel=new Criterial(); criterl.and("createTime").is(req.getCreateTime()) Sort sort=Sort.by(sort.Diretion.DESC,mongod库对应属性) //Sort sort = new Sort(Sort.Direction.ASC, “useName”).and(new //Sort(Sort.Direction.ASC, “TIME”)); //多条件userName、time排序 mongoTempalate.find(new Qurey(criteria).with(sort).skip(req.getPage()-1)*req.getPageSize()).limit(req.getpageSize(),对应mongodbJava对象.class,"mongodb集合名称")

spring boot--Mongdb排序分页

标签:gdb   and   time()   size   page   mongodb   spring   asc   mon   

查看更多关于spring boot--Mongdb排序分页的详细内容...

  阅读:25次