diff --git a/resource-server/src/main/java/com/inhabas/api/domain/club/usecase/ClubHistoryServiceImpl.java b/resource-server/src/main/java/com/inhabas/api/domain/club/usecase/ClubHistoryServiceImpl.java index 7c8b390c..9014f9e5 100644 --- a/resource-server/src/main/java/com/inhabas/api/domain/club/usecase/ClubHistoryServiceImpl.java +++ b/resource-server/src/main/java/com/inhabas/api/domain/club/usecase/ClubHistoryServiceImpl.java @@ -11,6 +11,7 @@ import com.inhabas.api.domain.club.dto.SaveClubHistoryDto; import com.inhabas.api.domain.club.repository.ClubHistoryRepository; import lombok.RequiredArgsConstructor; +import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -58,7 +59,8 @@ public ClubHistoryDto findClubHistory(Long clubHistoryId) { @Transactional(readOnly = true) public List getClubHistories() { - List clubHistoryList = clubHistoryRepository.findAll(); + Sort sort = Sort.by(Sort.Direction.DESC, "dateHistory"); + List clubHistoryList = clubHistoryRepository.findAll(sort); return clubHistoryList.stream() .map(ClubHistoryDto::new)