直接在Query里面添加with,即可,例如
//rank排序
Sort rankSort = new Sort(Sort.Direction.ASC, rankField);
//创建时间排序
Sort createDateSort = new Sort(Sort.Direction.DESC, FIELD_CREATE_DATE);
Query query = Query.query(criteria);
query.with(rankSort).with(createDateSort);