diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/domain/announcement/service/AnnouncementService.java b/backend/core/src/main/java/site/timecapsulearchive/core/domain/announcement/service/AnnouncementService.java index 10f31b177..bd6da8190 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/domain/announcement/service/AnnouncementService.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/domain/announcement/service/AnnouncementService.java @@ -1,5 +1,6 @@ package site.timecapsulearchive.core.domain.announcement.service; +import java.util.Comparator; import java.util.List; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; @@ -13,6 +14,10 @@ public class AnnouncementService { private final AnnouncementRepository announcementRepository; public List findAll() { - return announcementRepository.findAll(); + List announcements = announcementRepository.findAll(); + + announcements.sort(Comparator.comparing(AnnouncementDto::createdAt).reversed()); + + return announcements; } }