[JPA] findAll일 때 sort해서 데이터 보여주기

seul·2021년 2월 13일
1

JPA

목록 보기
3/5

JpaRepository의 findAll 사용 시 sort 하는 방법

List<Tour> tours = tourRepository.findAll(Sort.by(Sort.Direction.DESC, "id"));
profile
무한삽질로그

0개의 댓글