findAll일 때 sort하기

2021-02-13
  • Java
  • JPA

JpaRepository의 findAll 사용 시 sort 하는 방법

List<Tour> tours = tourRepository.findAll(Sort.by(Sort.Direction.DESC, "id"));
Profile picture

2yeseul

트리플에서 백엔드 개발을 맡고 있습니다. 무한 삽질을 기록합니다. ⚒️