From 83169a9503b218009086c27aea1f7c8b325dc4b9 Mon Sep 17 00:00:00 2001 From: parkheeddong Date: Wed, 3 Apr 2024 21:32:40 +0900 Subject: [PATCH] =?UTF-8?q?#273=20[fix]=20error=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mile/writername/repository/WriterNameRepository.java | 2 +- .../java/com/mile/writername/service/WriterNameService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module-domain/src/main/java/com/mile/writername/repository/WriterNameRepository.java b/module-domain/src/main/java/com/mile/writername/repository/WriterNameRepository.java index 3c3240ba..9385ae18 100644 --- a/module-domain/src/main/java/com/mile/writername/repository/WriterNameRepository.java +++ b/module-domain/src/main/java/com/mile/writername/repository/WriterNameRepository.java @@ -24,5 +24,5 @@ public interface WriterNameRepository extends JpaRepository { List findTop2ByMoimIdAndTotalCuriousCountGreaterThanOrderByTotalCuriousCountDesc(final Long moimId, final int totalCuriousCount); Page findByMoimIdOrderByIdDesc(Long moimId, Pageable pageable); - Optional getById(final Long id); + Optional findById(final Long id); } \ No newline at end of file diff --git a/module-domain/src/main/java/com/mile/writername/service/WriterNameService.java b/module-domain/src/main/java/com/mile/writername/service/WriterNameService.java index 58d1c9e8..1a0ee056 100644 --- a/module-domain/src/main/java/com/mile/writername/service/WriterNameService.java +++ b/module-domain/src/main/java/com/mile/writername/service/WriterNameService.java @@ -117,7 +117,7 @@ public Long createWriterName(final User user, final Moim moim, final WriterMembe } public WriterName getById(final Long writerNameId) { - return writerNameRepository.getById(writerNameId) + return writerNameRepository.findById(writerNameId) .orElseThrow( () -> new NotFoundException(ErrorMessage.WRITER_NOT_FOUND) );