From 36b1f8a167665b5e407ba8d301e773e5a3fa1194 Mon Sep 17 00:00:00 2001 From: Son Chanhyeok <127181634+hyeokson@users.noreply.github.com> Date: Sun, 11 Aug 2024 23:51:11 +0900 Subject: [PATCH] =?UTF-8?q?=08[Refactor]=20MainPageController=20=ED=81=B4?= =?UTF-8?q?=EB=9E=98=EC=8A=A4=EB=AA=85=20=EB=B3=80=EA=B2=BD=20(#72)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * config: jwt 속성을 yml에 설정 * rebase: 원본 develop 브랜치와 병합 * refactor: transactional 어노테이션 수정 * refactor: 변수명 변경 * feat: MainPage 컨트롤러 클래스 생성 * feat: MainPage service 클래스 생성 * feat: StaticResources entity 클래스 생성 * feat: StaticResources repository 클래스 생성 * feat: StaticResourcesUtil 클래스 생성 * feat: 정적 text를 관리하는 enum 생성 * refactor: 변수명 변경 * refactor: 검증 애노테이션 추가 * refactor: DayOfWeek 속성 변경 * refactor: 예외 msg를 응답객체 result에 넣도록 변경 * refactor: 변수명 변경 * refactor: DayOfWeek 속성 변경 * refactor: 검증 애노테이션 추가 * refactor: 검증 상수 추가 * refactor: 변수 타입을 래퍼타입으로 변경 * refactor: 클래스명 변경 * refactor: 클래스명 및 변수명 변경 * feat: final 객체 초기화 --------- Co-authored-by: hyeokson --- .../bo_domain/admin/controller/AdminMainPageController.java | 6 +++--- .../{MainPageService.java => AdminMainPageService.java} | 2 +- .../global/staticresources/util/StaticResourcesUtil.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename src/main/java/com/softeer/backend/bo_domain/admin/service/{MainPageService.java => AdminMainPageService.java} (96%) diff --git a/src/main/java/com/softeer/backend/bo_domain/admin/controller/AdminMainPageController.java b/src/main/java/com/softeer/backend/bo_domain/admin/controller/AdminMainPageController.java index 824b3b39..670014bf 100644 --- a/src/main/java/com/softeer/backend/bo_domain/admin/controller/AdminMainPageController.java +++ b/src/main/java/com/softeer/backend/bo_domain/admin/controller/AdminMainPageController.java @@ -1,7 +1,7 @@ package com.softeer.backend.bo_domain.admin.controller; import com.softeer.backend.bo_domain.admin.dto.main.MainPageResponseDto; -import com.softeer.backend.bo_domain.admin.service.MainPageService; +import com.softeer.backend.bo_domain.admin.service.AdminMainPageService; import com.softeer.backend.global.common.response.ResponseDto; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; @@ -12,11 +12,11 @@ @RequiredArgsConstructor @RequestMapping("/admin") public class AdminMainPageController { - private final MainPageService mainPageService; + private final AdminMainPageService adminMainPageService; @GetMapping("/main") public ResponseDto getMainPage() { - MainPageResponseDto mainPageResponseDto = mainPageService.getMainPage(); + MainPageResponseDto mainPageResponseDto = adminMainPageService.getMainPage(); return ResponseDto.onSuccess(mainPageResponseDto); } diff --git a/src/main/java/com/softeer/backend/bo_domain/admin/service/MainPageService.java b/src/main/java/com/softeer/backend/bo_domain/admin/service/AdminMainPageService.java similarity index 96% rename from src/main/java/com/softeer/backend/bo_domain/admin/service/MainPageService.java rename to src/main/java/com/softeer/backend/bo_domain/admin/service/AdminMainPageService.java index 5ddccb36..e78c484e 100644 --- a/src/main/java/com/softeer/backend/bo_domain/admin/service/MainPageService.java +++ b/src/main/java/com/softeer/backend/bo_domain/admin/service/AdminMainPageService.java @@ -14,7 +14,7 @@ @Service @RequiredArgsConstructor -public class MainPageService { +public class AdminMainPageService { private final FcfsSettingRepository fcfsSettingRepository; private final DrawSettingRepository drawSettingRepository; diff --git a/src/main/java/com/softeer/backend/global/staticresources/util/StaticResourcesUtil.java b/src/main/java/com/softeer/backend/global/staticresources/util/StaticResourcesUtil.java index 3a9c2456..22705b8e 100644 --- a/src/main/java/com/softeer/backend/global/staticresources/util/StaticResourcesUtil.java +++ b/src/main/java/com/softeer/backend/global/staticresources/util/StaticResourcesUtil.java @@ -18,7 +18,7 @@ public class StaticResourcesUtil { private final StaticResourcesRepository staticResourcesRepository; - private Map s3Urls; + private final Map s3Urls = new HashMap<>(); @PostConstruct public void init() {