📜  findall(sort sort) 示例 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:25.033000             🧑  作者: Mango

代码示例1
@Repository
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentDAO studentDao;

    @Override
    public List findAll() {
        return studentDao.findAll(orderByIdAsc());
    }
private Sort orderByIdAsc() {
    return new Sort(Sort.Direction.ASC, "id")
                .and(new Sort(Sort.Direction.ASC, "name"));
}
}