From 1ce5d0c5097805adee272fb04a4950923cc63e53 Mon Sep 17 00:00:00 2001 From: Jo Hyeong-Ik <70360890+ikjo39@users.noreply.github.com> Date: Thu, 10 Oct 2024 20:34:34 +0900 Subject: [PATCH] =?UTF-8?q?[BE]=20=EB=B9=84=EB=B0=80=EB=B2=88=ED=98=B8=20?= =?UTF-8?q?=EB=A7=88=EC=9D=B4=EA=B7=B8=EB=A0=88=EC=9D=B4=EC=85=98=20?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=20=EC=82=AD=EC=A0=9C=20(#386)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: 서브모듈 변경사항 반영 * hotfix: 불필요한 메서드 삭제 * refactor: 로그 레벨 debug로 수정 --- .../kr/momo/config/RoutingDataSource.java | 2 +- .../attendee/AttendeeController.java | 8 -------- .../service/attendee/AttendeeService.java | 20 ------------------- backend/src/main/resources/security | 2 +- 4 files changed, 2 insertions(+), 30 deletions(-) diff --git a/backend/src/main/java/kr/momo/config/RoutingDataSource.java b/backend/src/main/java/kr/momo/config/RoutingDataSource.java index 61610d8bd..54096002c 100644 --- a/backend/src/main/java/kr/momo/config/RoutingDataSource.java +++ b/backend/src/main/java/kr/momo/config/RoutingDataSource.java @@ -13,7 +13,7 @@ public class RoutingDataSource extends AbstractRoutingDataSource { protected Object determineCurrentLookupKey() { boolean currentTransactionReadOnly = TransactionSynchronizationManager.isCurrentTransactionReadOnly(); String key = currentTransactionReadOnly ? DataSourceConfig.REPLICA_SERVER : DataSourceConfig.SOURCE_SERVER; - log.info("Activated Datasource: {}", key); + log.debug("Activated Datasource: {}", key); return key; } } diff --git a/backend/src/main/java/kr/momo/controller/attendee/AttendeeController.java b/backend/src/main/java/kr/momo/controller/attendee/AttendeeController.java index e7a496ea2..ae76baf74 100644 --- a/backend/src/main/java/kr/momo/controller/attendee/AttendeeController.java +++ b/backend/src/main/java/kr/momo/controller/attendee/AttendeeController.java @@ -50,12 +50,4 @@ public ResponseEntity logout(@PathVariable String uuid) { public MomoApiResponse> findAttendeesOfMeeting(@PathVariable String uuid) { return new MomoApiResponse<>(attendeeService.findAll(uuid)); } - - /** - * TEMP: 비밀번호 마이그레이션 이후 삭제될 메서드입니다. - */ - @PostMapping("/api/v1/attendee/update-password") - public MomoApiResponse updatePassword() { - return new MomoApiResponse<>(attendeeService.updateAllPassword()); - } } diff --git a/backend/src/main/java/kr/momo/service/attendee/AttendeeService.java b/backend/src/main/java/kr/momo/service/attendee/AttendeeService.java index 7effeb711..0795979e5 100644 --- a/backend/src/main/java/kr/momo/service/attendee/AttendeeService.java +++ b/backend/src/main/java/kr/momo/service/attendee/AttendeeService.java @@ -63,24 +63,4 @@ public List findAll(String uuid) { .map(Attendee::name) .toList(); } - - /** - * TEMP: 비밀번호 마이그레이션 이후 삭제될 메서드입니다. - */ - @Transactional - public Integer updateAllPassword() { - List attendees = attendeeRepository.findAll(); - List rawAttendees = attendees.stream() - .filter(attendee -> attendee.getPassword().getPassword().length() < 15) - .toList(); - rawAttendees.forEach( - attendee -> { - String rawPassword = attendee.getPassword().getPassword(); - String encodedPassword = passwordEncoder.encode(rawPassword); - attendee.updatePassword(encodedPassword); - } - ); - attendeeRepository.saveAll(rawAttendees); - return rawAttendees.size(); - } } diff --git a/backend/src/main/resources/security b/backend/src/main/resources/security index 45da7cf52..0a98e5e07 160000 --- a/backend/src/main/resources/security +++ b/backend/src/main/resources/security @@ -1 +1 @@ -Subproject commit 45da7cf5212cf5a9d95234bf83466b02862724ff +Subproject commit 0a98e5e079296a8cb01d312c061dbbe2401bddf7