From 97ef0409b5c464c88bae90b81fb57fdbf55ebe78 Mon Sep 17 00:00:00 2001 From: dong2ast Date: Tue, 1 Aug 2023 13:21:33 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=ED=8F=B4=EB=8D=94=20=EA=B5=AC?= =?UTF-8?q?=EC=A1=B0=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/sophy/sophy/controller/AuthorController.java | 4 ++-- .../java/org/sophy/sophy/controller/BooktalkController.java | 2 +- .../java/org/sophy/sophy/controller/HomeController.java | 6 +----- .../java/org/sophy/sophy/controller/MemberController.java | 2 +- .../java/org/sophy/sophy/controller/OperatorController.java | 2 +- .../java/org/sophy/sophy/controller/PlaceController.java | 2 +- .../org/sophy/sophy/controller/SophyStoryController.java | 2 +- src/main/java/org/sophy/sophy/domain/Book.java | 2 +- .../org/sophy/sophy/service/{ => api}/BooktalkService.java | 2 +- .../java/org/sophy/sophy/service/{ => api}/HomeService.java | 2 +- .../org/sophy/sophy/service/{ => api}/MemberService.java | 2 +- .../org/sophy/sophy/service/{ => api}/OperatorService.java | 2 +- .../org/sophy/sophy/service/{ => api}/PlaceService.java | 2 +- .../sophy/sophy/service/{ => api}/SophyStoryService.java | 2 +- 14 files changed, 15 insertions(+), 19 deletions(-) rename src/main/java/org/sophy/sophy/service/{ => api}/BooktalkService.java (99%) rename src/main/java/org/sophy/sophy/service/{ => api}/HomeService.java (99%) rename src/main/java/org/sophy/sophy/service/{ => api}/MemberService.java (99%) rename src/main/java/org/sophy/sophy/service/{ => api}/OperatorService.java (97%) rename src/main/java/org/sophy/sophy/service/{ => api}/PlaceService.java (98%) rename src/main/java/org/sophy/sophy/service/{ => api}/SophyStoryService.java (98%) diff --git a/src/main/java/org/sophy/sophy/controller/AuthorController.java b/src/main/java/org/sophy/sophy/controller/AuthorController.java index fe6b074..51703b2 100644 --- a/src/main/java/org/sophy/sophy/controller/AuthorController.java +++ b/src/main/java/org/sophy/sophy/controller/AuthorController.java @@ -13,8 +13,8 @@ import org.sophy.sophy.domain.dto.booktalk.response.BooktalkDeleteResponseDto; import org.sophy.sophy.domain.dto.mypage.MyPageBooktalkDto; import org.sophy.sophy.exception.SuccessStatus; -import org.sophy.sophy.service.BooktalkService; -import org.sophy.sophy.service.MemberService; +import org.sophy.sophy.service.api.BooktalkService; +import org.sophy.sophy.service.api.MemberService; import org.springframework.http.HttpStatus; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.core.userdetails.User; diff --git a/src/main/java/org/sophy/sophy/controller/BooktalkController.java b/src/main/java/org/sophy/sophy/controller/BooktalkController.java index da12c60..6c75f0c 100644 --- a/src/main/java/org/sophy/sophy/controller/BooktalkController.java +++ b/src/main/java/org/sophy/sophy/controller/BooktalkController.java @@ -11,7 +11,7 @@ import org.sophy.sophy.domain.dto.booktalk.response.BooktalkResponseDto; import org.sophy.sophy.domain.enumerate.City; import org.sophy.sophy.exception.SuccessStatus; -import org.sophy.sophy.service.BooktalkService; +import org.sophy.sophy.service.api.BooktalkService; import org.springframework.http.HttpStatus; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.core.userdetails.User; diff --git a/src/main/java/org/sophy/sophy/controller/HomeController.java b/src/main/java/org/sophy/sophy/controller/HomeController.java index bbedc75..f83dc3b 100644 --- a/src/main/java/org/sophy/sophy/controller/HomeController.java +++ b/src/main/java/org/sophy/sophy/controller/HomeController.java @@ -7,17 +7,13 @@ import lombok.RequiredArgsConstructor; import org.sophy.sophy.common.dto.ApiResponseDto; import org.sophy.sophy.domain.dto.HomeResponseDto; -import org.sophy.sophy.domain.enumerate.Authority; import org.sophy.sophy.exception.SuccessStatus; -import org.sophy.sophy.service.HomeService; -import org.springframework.security.core.GrantedAuthority; +import org.sophy.sophy.service.api.HomeService; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.core.userdetails.User; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; -import java.util.Collection; - @RestController @RequiredArgsConstructor diff --git a/src/main/java/org/sophy/sophy/controller/MemberController.java b/src/main/java/org/sophy/sophy/controller/MemberController.java index 768f491..0fb0706 100644 --- a/src/main/java/org/sophy/sophy/controller/MemberController.java +++ b/src/main/java/org/sophy/sophy/controller/MemberController.java @@ -10,7 +10,7 @@ import org.sophy.sophy.domain.dto.mypage.MyPageDto; import org.sophy.sophy.domain.dto.mypage.MyInfoDto; import org.sophy.sophy.exception.SuccessStatus; -import org.sophy.sophy.service.MemberService; +import org.sophy.sophy.service.api.MemberService; import org.springframework.http.HttpStatus; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.core.userdetails.User; diff --git a/src/main/java/org/sophy/sophy/controller/OperatorController.java b/src/main/java/org/sophy/sophy/controller/OperatorController.java index 2008421..4f533f6 100644 --- a/src/main/java/org/sophy/sophy/controller/OperatorController.java +++ b/src/main/java/org/sophy/sophy/controller/OperatorController.java @@ -6,7 +6,7 @@ import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.sophy.sophy.domain.Booktalk; -import org.sophy.sophy.service.OperatorService; +import org.sophy.sophy.service.api.OperatorService; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.core.userdetails.User; import org.springframework.web.bind.annotation.*; diff --git a/src/main/java/org/sophy/sophy/controller/PlaceController.java b/src/main/java/org/sophy/sophy/controller/PlaceController.java index 62c61dd..cf1eb33 100644 --- a/src/main/java/org/sophy/sophy/controller/PlaceController.java +++ b/src/main/java/org/sophy/sophy/controller/PlaceController.java @@ -10,7 +10,7 @@ import org.sophy.sophy.domain.dto.place.request.PlaceRequestDto; import org.sophy.sophy.domain.enumerate.City; import org.sophy.sophy.exception.SuccessStatus; -import org.sophy.sophy.service.PlaceService; +import org.sophy.sophy.service.api.PlaceService; import org.springframework.http.HttpStatus; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.core.userdetails.User; diff --git a/src/main/java/org/sophy/sophy/controller/SophyStoryController.java b/src/main/java/org/sophy/sophy/controller/SophyStoryController.java index 2aedf8f..fb8bbfb 100644 --- a/src/main/java/org/sophy/sophy/controller/SophyStoryController.java +++ b/src/main/java/org/sophy/sophy/controller/SophyStoryController.java @@ -8,7 +8,7 @@ import org.sophy.sophy.domain.dto.SophyStoryDto; import org.sophy.sophy.domain.dto.SophyStoryRequestDto; import org.sophy.sophy.exception.SuccessStatus; -import org.sophy.sophy.service.SophyStoryService; +import org.sophy.sophy.service.api.SophyStoryService; import org.springframework.security.core.annotation.AuthenticationPrincipal; import org.springframework.security.core.userdetails.User; import org.springframework.web.bind.annotation.*; diff --git a/src/main/java/org/sophy/sophy/domain/Book.java b/src/main/java/org/sophy/sophy/domain/Book.java index 5a5701d..f368b0d 100644 --- a/src/main/java/org/sophy/sophy/domain/Book.java +++ b/src/main/java/org/sophy/sophy/domain/Book.java @@ -23,7 +23,7 @@ public class Book { private Boolean isRegistration; @Column(length = 1000) private String bookImageUrl; - @ManyToOne + @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "author_property_id") private AuthorProperty authorProperty; diff --git a/src/main/java/org/sophy/sophy/service/BooktalkService.java b/src/main/java/org/sophy/sophy/service/api/BooktalkService.java similarity index 99% rename from src/main/java/org/sophy/sophy/service/BooktalkService.java rename to src/main/java/org/sophy/sophy/service/api/BooktalkService.java index 91c0096..002bfc1 100644 --- a/src/main/java/org/sophy/sophy/service/BooktalkService.java +++ b/src/main/java/org/sophy/sophy/service/api/BooktalkService.java @@ -1,4 +1,4 @@ -package org.sophy.sophy.service; +package org.sophy.sophy.service.api; import lombok.RequiredArgsConstructor; import org.sophy.sophy.domain.*; diff --git a/src/main/java/org/sophy/sophy/service/HomeService.java b/src/main/java/org/sophy/sophy/service/api/HomeService.java similarity index 99% rename from src/main/java/org/sophy/sophy/service/HomeService.java rename to src/main/java/org/sophy/sophy/service/api/HomeService.java index 76db857..b9435b3 100644 --- a/src/main/java/org/sophy/sophy/service/HomeService.java +++ b/src/main/java/org/sophy/sophy/service/api/HomeService.java @@ -1,4 +1,4 @@ -package org.sophy.sophy.service; +package org.sophy.sophy.service.api; import lombok.RequiredArgsConstructor; import org.sophy.sophy.domain.Member; diff --git a/src/main/java/org/sophy/sophy/service/MemberService.java b/src/main/java/org/sophy/sophy/service/api/MemberService.java similarity index 99% rename from src/main/java/org/sophy/sophy/service/MemberService.java rename to src/main/java/org/sophy/sophy/service/api/MemberService.java index 0be6c77..596a51d 100644 --- a/src/main/java/org/sophy/sophy/service/MemberService.java +++ b/src/main/java/org/sophy/sophy/service/api/MemberService.java @@ -1,4 +1,4 @@ -package org.sophy.sophy.service; +package org.sophy.sophy.service.api; import lombok.RequiredArgsConstructor; import org.sophy.sophy.controller.dto.request.MemberAdditionalInfoDto; diff --git a/src/main/java/org/sophy/sophy/service/OperatorService.java b/src/main/java/org/sophy/sophy/service/api/OperatorService.java similarity index 97% rename from src/main/java/org/sophy/sophy/service/OperatorService.java rename to src/main/java/org/sophy/sophy/service/api/OperatorService.java index 9573f4e..1b5c54d 100644 --- a/src/main/java/org/sophy/sophy/service/OperatorService.java +++ b/src/main/java/org/sophy/sophy/service/api/OperatorService.java @@ -1,4 +1,4 @@ -package org.sophy.sophy.service; +package org.sophy.sophy.service.api; import lombok.RequiredArgsConstructor; import org.sophy.sophy.domain.Booktalk; diff --git a/src/main/java/org/sophy/sophy/service/PlaceService.java b/src/main/java/org/sophy/sophy/service/api/PlaceService.java similarity index 98% rename from src/main/java/org/sophy/sophy/service/PlaceService.java rename to src/main/java/org/sophy/sophy/service/api/PlaceService.java index 38c9dc6..30b3337 100644 --- a/src/main/java/org/sophy/sophy/service/PlaceService.java +++ b/src/main/java/org/sophy/sophy/service/api/PlaceService.java @@ -1,4 +1,4 @@ -package org.sophy.sophy.service; +package org.sophy.sophy.service.api; import lombok.RequiredArgsConstructor; import org.sophy.sophy.controller.dto.response.PlaceResponseDto; diff --git a/src/main/java/org/sophy/sophy/service/SophyStoryService.java b/src/main/java/org/sophy/sophy/service/api/SophyStoryService.java similarity index 98% rename from src/main/java/org/sophy/sophy/service/SophyStoryService.java rename to src/main/java/org/sophy/sophy/service/api/SophyStoryService.java index 3fe3045..18518c6 100644 --- a/src/main/java/org/sophy/sophy/service/SophyStoryService.java +++ b/src/main/java/org/sophy/sophy/service/api/SophyStoryService.java @@ -1,4 +1,4 @@ -package org.sophy.sophy.service; +package org.sophy.sophy.service.api; import lombok.RequiredArgsConstructor; import org.sophy.sophy.domain.CompletedBooktalk;