diff --git a/src/main/java/org/kkumulkkum/server/controller/AuthController.java b/src/main/java/org/kkumulkkum/server/api/auth/controller/AuthController.java similarity index 78% rename from src/main/java/org/kkumulkkum/server/controller/AuthController.java rename to src/main/java/org/kkumulkkum/server/api/auth/controller/AuthController.java index 30ba825..099718c 100644 --- a/src/main/java/org/kkumulkkum/server/controller/AuthController.java +++ b/src/main/java/org/kkumulkkum/server/api/auth/controller/AuthController.java @@ -1,15 +1,15 @@ -package org.kkumulkkum.server.controller; +package org.kkumulkkum.server.api.auth.controller; import com.google.firebase.database.annotations.Nullable; import jakarta.validation.Valid; import jakarta.validation.constraints.NotBlank; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.annotation.UserId; -import org.kkumulkkum.server.constant.AuthConstant; -import org.kkumulkkum.server.dto.auth.request.UserLoginDto; -import org.kkumulkkum.server.dto.auth.response.JwtTokenDto; -import org.kkumulkkum.server.dto.auth.response.UserTokenDto; -import org.kkumulkkum.server.service.auth.AuthService; +import org.kkumulkkum.server.common.auth.annotation.UserId; +import org.kkumulkkum.server.common.auth.constant.AuthConstant; +import org.kkumulkkum.server.api.auth.dto.request.UserLoginDto; +import org.kkumulkkum.server.api.auth.dto.response.JwtTokenDto; +import org.kkumulkkum.server.api.auth.dto.response.UserTokenDto; +import org.kkumulkkum.server.api.auth.service.AuthService; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; diff --git a/src/main/java/org/kkumulkkum/server/auth/openfeign/kakao/dto/SocialUserDto.java b/src/main/java/org/kkumulkkum/server/api/auth/dto/SocialUserDto.java similarity index 77% rename from src/main/java/org/kkumulkkum/server/auth/openfeign/kakao/dto/SocialUserDto.java rename to src/main/java/org/kkumulkkum/server/api/auth/dto/SocialUserDto.java index d97f9f4..cfcd61e 100644 --- a/src/main/java/org/kkumulkkum/server/auth/openfeign/kakao/dto/SocialUserDto.java +++ b/src/main/java/org/kkumulkkum/server/api/auth/dto/SocialUserDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.auth.openfeign.kakao.dto; +package org.kkumulkkum.server.api.auth.dto; public record SocialUserDto(String platformId, String email) { diff --git a/src/main/java/org/kkumulkkum/server/dto/auth/request/UserLoginDto.java b/src/main/java/org/kkumulkkum/server/api/auth/dto/request/UserLoginDto.java similarity index 66% rename from src/main/java/org/kkumulkkum/server/dto/auth/request/UserLoginDto.java rename to src/main/java/org/kkumulkkum/server/api/auth/dto/request/UserLoginDto.java index 739115d..269a51c 100644 --- a/src/main/java/org/kkumulkkum/server/dto/auth/request/UserLoginDto.java +++ b/src/main/java/org/kkumulkkum/server/api/auth/dto/request/UserLoginDto.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.dto.auth.request; +package org.kkumulkkum.server.api.auth.dto.request; import jakarta.annotation.Nullable; import jakarta.validation.constraints.NotNull; -import org.kkumulkkum.server.domain.enums.Provider; +import org.kkumulkkum.server.domain.user.Provider; public record UserLoginDto( @NotNull diff --git a/src/main/java/org/kkumulkkum/server/dto/auth/response/JwtTokenDto.java b/src/main/java/org/kkumulkkum/server/api/auth/dto/response/JwtTokenDto.java similarity index 88% rename from src/main/java/org/kkumulkkum/server/dto/auth/response/JwtTokenDto.java rename to src/main/java/org/kkumulkkum/server/api/auth/dto/response/JwtTokenDto.java index d36465d..269901e 100644 --- a/src/main/java/org/kkumulkkum/server/dto/auth/response/JwtTokenDto.java +++ b/src/main/java/org/kkumulkkum/server/api/auth/dto/response/JwtTokenDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.dto.auth.response; +package org.kkumulkkum.server.api.auth.dto.response; import lombok.AccessLevel; import lombok.Builder; diff --git a/src/main/java/org/kkumulkkum/server/dto/auth/response/UserTokenDto.java b/src/main/java/org/kkumulkkum/server/api/auth/dto/response/UserTokenDto.java similarity index 71% rename from src/main/java/org/kkumulkkum/server/dto/auth/response/UserTokenDto.java rename to src/main/java/org/kkumulkkum/server/api/auth/dto/response/UserTokenDto.java index 4777218..8e189a1 100644 --- a/src/main/java/org/kkumulkkum/server/dto/auth/response/UserTokenDto.java +++ b/src/main/java/org/kkumulkkum/server/api/auth/dto/response/UserTokenDto.java @@ -1,6 +1,6 @@ -package org.kkumulkkum.server.dto.auth.response; +package org.kkumulkkum.server.api.auth.dto.response; -import org.kkumulkkum.server.domain.UserInfo; +import org.kkumulkkum.server.domain.userinfo.UserInfo; public record UserTokenDto( String name, diff --git a/src/main/java/org/kkumulkkum/server/auth/openfeign/apple/dto/ApplePublicKey.java b/src/main/java/org/kkumulkkum/server/api/auth/dto/verify/ApplePublicKey.java similarity index 69% rename from src/main/java/org/kkumulkkum/server/auth/openfeign/apple/dto/ApplePublicKey.java rename to src/main/java/org/kkumulkkum/server/api/auth/dto/verify/ApplePublicKey.java index 3ef4abc..a06b05e 100644 --- a/src/main/java/org/kkumulkkum/server/auth/openfeign/apple/dto/ApplePublicKey.java +++ b/src/main/java/org/kkumulkkum/server/api/auth/dto/verify/ApplePublicKey.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.auth.openfeign.apple.dto; +package org.kkumulkkum.server.api.auth.dto.verify; public record ApplePublicKey( String kty, String kid, String use, String alg, String n, String e, String email diff --git a/src/main/java/org/kkumulkkum/server/auth/openfeign/apple/dto/ApplePublicKeys.java b/src/main/java/org/kkumulkkum/server/api/auth/dto/verify/ApplePublicKeys.java similarity index 69% rename from src/main/java/org/kkumulkkum/server/auth/openfeign/apple/dto/ApplePublicKeys.java rename to src/main/java/org/kkumulkkum/server/api/auth/dto/verify/ApplePublicKeys.java index 3312e5c..9f021c9 100644 --- a/src/main/java/org/kkumulkkum/server/auth/openfeign/apple/dto/ApplePublicKeys.java +++ b/src/main/java/org/kkumulkkum/server/api/auth/dto/verify/ApplePublicKeys.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.auth.openfeign.apple.dto; +package org.kkumulkkum.server.api.auth.dto.verify; -import org.kkumulkkum.server.exception.AuthException; -import org.kkumulkkum.server.exception.code.AuthErrorCode; +import org.kkumulkkum.server.common.exception.AuthException; +import org.kkumulkkum.server.common.exception.code.AuthErrorCode; import java.util.List; diff --git a/src/main/java/org/kkumulkkum/server/auth/openfeign/apple/service/AppleService.java b/src/main/java/org/kkumulkkum/server/api/auth/service/AppleService.java similarity index 74% rename from src/main/java/org/kkumulkkum/server/auth/openfeign/apple/service/AppleService.java rename to src/main/java/org/kkumulkkum/server/api/auth/service/AppleService.java index 343475e..4144047 100644 --- a/src/main/java/org/kkumulkkum/server/auth/openfeign/apple/service/AppleService.java +++ b/src/main/java/org/kkumulkkum/server/api/auth/service/AppleService.java @@ -1,22 +1,21 @@ -package org.kkumulkkum.server.auth.openfeign.apple.service; +package org.kkumulkkum.server.api.auth.service; import io.jsonwebtoken.Claims; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.kkumulkkum.server.auth.openfeign.apple.AppleFeignClient; -import org.kkumulkkum.server.auth.openfeign.apple.dto.ApplePublicKeys; -import org.kkumulkkum.server.auth.openfeign.apple.dto.AppleTokenDto; -import org.kkumulkkum.server.auth.openfeign.apple.verify.AppleClientSecretGenerator; -import org.kkumulkkum.server.auth.openfeign.apple.verify.AppleJwtParser; -import org.kkumulkkum.server.auth.openfeign.apple.verify.PublicKeyGenerator; -import org.kkumulkkum.server.auth.openfeign.kakao.dto.SocialUserDto; -import org.kkumulkkum.server.exception.AuthException; -import org.kkumulkkum.server.exception.BusinessException; -import org.kkumulkkum.server.exception.code.AuthErrorCode; -import org.kkumulkkum.server.exception.code.BusinessErrorCode; +import org.kkumulkkum.server.external.service.apple.AppleFeignClient; +import org.kkumulkkum.server.api.auth.dto.verify.ApplePublicKeys; +import org.kkumulkkum.server.external.service.apple.dto.AppleTokenDto; +import org.kkumulkkum.server.api.auth.service.verify.AppleClientSecretGenerator; +import org.kkumulkkum.server.api.auth.service.verify.AppleJwtParser; +import org.kkumulkkum.server.api.auth.service.verify.PublicKeyGenerator; +import org.kkumulkkum.server.api.auth.dto.SocialUserDto; +import org.kkumulkkum.server.common.exception.AuthException; +import org.kkumulkkum.server.common.exception.BusinessException; +import org.kkumulkkum.server.common.exception.code.AuthErrorCode; +import org.kkumulkkum.server.common.exception.code.BusinessErrorCode; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import org.springframework.web.bind.MissingRequestHeaderException; import java.security.PublicKey; import java.util.Map; diff --git a/src/main/java/org/kkumulkkum/server/service/auth/AuthService.java b/src/main/java/org/kkumulkkum/server/api/auth/service/AuthService.java similarity index 75% rename from src/main/java/org/kkumulkkum/server/service/auth/AuthService.java rename to src/main/java/org/kkumulkkum/server/api/auth/service/AuthService.java index 685b62d..cb8531d 100644 --- a/src/main/java/org/kkumulkkum/server/service/auth/AuthService.java +++ b/src/main/java/org/kkumulkkum/server/api/auth/service/AuthService.java @@ -1,33 +1,34 @@ -package org.kkumulkkum.server.service.auth; +package org.kkumulkkum.server.api.auth.service; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.auth.jwt.JwtTokenProvider; -import org.kkumulkkum.server.auth.openfeign.kakao.dto.SocialUserDto; -import org.kkumulkkum.server.auth.openfeign.apple.service.AppleService; -import org.kkumulkkum.server.auth.openfeign.kakao.service.KakaoService; -import org.kkumulkkum.server.domain.Member; -import org.kkumulkkum.server.domain.Token; -import org.kkumulkkum.server.domain.User; -import org.kkumulkkum.server.domain.UserInfo; -import org.kkumulkkum.server.domain.enums.Provider; -import org.kkumulkkum.server.domain.enums.Role; -import org.kkumulkkum.server.dto.auth.request.UserLoginDto; -import org.kkumulkkum.server.dto.auth.response.JwtTokenDto; -import org.kkumulkkum.server.dto.auth.response.UserTokenDto; -import org.kkumulkkum.server.exception.AuthException; -import org.kkumulkkum.server.exception.code.AuthErrorCode; -import org.kkumulkkum.server.service.member.MemberRemover; -import org.kkumulkkum.server.service.member.MemberRetreiver; -import org.kkumulkkum.server.service.participant.ParticipantRemover; -import org.kkumulkkum.server.service.participant.ParticipantRetriever; -import org.kkumulkkum.server.service.promise.PromiseRemover; -import org.kkumulkkum.server.service.promise.PromiseRetriever; -import org.kkumulkkum.server.service.user.UserRemover; -import org.kkumulkkum.server.service.user.UserRetriever; -import org.kkumulkkum.server.service.user.UserSaver; -import org.kkumulkkum.server.service.userInfo.UserInfoRemover; -import org.kkumulkkum.server.service.userInfo.UserInfoRetriever; -import org.kkumulkkum.server.service.userInfo.UserInfoSaver; +import org.kkumulkkum.server.domain.user.manager.TokenRemover; +import org.kkumulkkum.server.domain.user.manager.TokenRetriever; +import org.kkumulkkum.server.domain.user.manager.TokenSaver; +import org.kkumulkkum.server.domain.member.manager.MemberRetreiver; +import org.kkumulkkum.server.domain.participant.manager.ParticipantRemover; +import org.kkumulkkum.server.domain.participant.manager.ParticipantRetriever; +import org.kkumulkkum.server.domain.promise.manager.PromiseRemover; +import org.kkumulkkum.server.domain.promise.manager.PromiseRetriever; +import org.kkumulkkum.server.domain.user.manager.UserRemover; +import org.kkumulkkum.server.domain.user.manager.UserRetriever; +import org.kkumulkkum.server.domain.userinfo.manager.UserInfoRemover; +import org.kkumulkkum.server.domain.userinfo.manager.UserInfoRetriever; +import org.kkumulkkum.server.domain.userinfo.manager.UserInfoSaver; +import org.kkumulkkum.server.common.auth.jwt.JwtTokenProvider; +import org.kkumulkkum.server.api.auth.dto.SocialUserDto; +import org.kkumulkkum.server.domain.member.Member; +import org.kkumulkkum.server.domain.user.Token; +import org.kkumulkkum.server.domain.user.User; +import org.kkumulkkum.server.domain.userinfo.UserInfo; +import org.kkumulkkum.server.domain.user.Provider; +import org.kkumulkkum.server.domain.user.Role; +import org.kkumulkkum.server.api.auth.dto.request.UserLoginDto; +import org.kkumulkkum.server.api.auth.dto.response.JwtTokenDto; +import org.kkumulkkum.server.api.auth.dto.response.UserTokenDto; +import org.kkumulkkum.server.common.exception.AuthException; +import org.kkumulkkum.server.common.exception.code.AuthErrorCode; +import org.kkumulkkum.server.domain.member.manager.MemberRemover; +import org.kkumulkkum.server.domain.user.manager.UserSaver; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/kkumulkkum/server/auth/openfeign/kakao/service/KakaoService.java b/src/main/java/org/kkumulkkum/server/api/auth/service/KakaoService.java similarity index 74% rename from src/main/java/org/kkumulkkum/server/auth/openfeign/kakao/service/KakaoService.java rename to src/main/java/org/kkumulkkum/server/api/auth/service/KakaoService.java index b3b8f23..2abc8fb 100644 --- a/src/main/java/org/kkumulkkum/server/auth/openfeign/kakao/service/KakaoService.java +++ b/src/main/java/org/kkumulkkum/server/api/auth/service/KakaoService.java @@ -1,10 +1,10 @@ -package org.kkumulkkum.server.auth.openfeign.kakao.service; +package org.kkumulkkum.server.api.auth.service; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.auth.openfeign.kakao.KakaoFeignClient; -import org.kkumulkkum.server.auth.openfeign.kakao.dto.KakaoUserDto; -import org.kkumulkkum.server.auth.openfeign.kakao.dto.SocialUserDto; -import org.kkumulkkum.server.constant.AuthConstant; +import org.kkumulkkum.server.external.service.kakao.KakaoFeignClient; +import org.kkumulkkum.server.external.service.kakao.dto.KakaoUserDto; +import org.kkumulkkum.server.api.auth.dto.SocialUserDto; +import org.kkumulkkum.server.common.auth.constant.AuthConstant; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; diff --git a/src/main/java/org/kkumulkkum/server/auth/openfeign/apple/verify/AppleClientSecretGenerator.java b/src/main/java/org/kkumulkkum/server/api/auth/service/verify/AppleClientSecretGenerator.java similarity index 97% rename from src/main/java/org/kkumulkkum/server/auth/openfeign/apple/verify/AppleClientSecretGenerator.java rename to src/main/java/org/kkumulkkum/server/api/auth/service/verify/AppleClientSecretGenerator.java index b60594c..a38954c 100644 --- a/src/main/java/org/kkumulkkum/server/auth/openfeign/apple/verify/AppleClientSecretGenerator.java +++ b/src/main/java/org/kkumulkkum/server/api/auth/service/verify/AppleClientSecretGenerator.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.auth.openfeign.apple.verify; +package org.kkumulkkum.server.api.auth.service.verify; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; diff --git a/src/main/java/org/kkumulkkum/server/auth/openfeign/apple/verify/AppleJwtParser.java b/src/main/java/org/kkumulkkum/server/api/auth/service/verify/AppleJwtParser.java similarity index 88% rename from src/main/java/org/kkumulkkum/server/auth/openfeign/apple/verify/AppleJwtParser.java rename to src/main/java/org/kkumulkkum/server/api/auth/service/verify/AppleJwtParser.java index e30f99f..7a4ba0d 100644 --- a/src/main/java/org/kkumulkkum/server/auth/openfeign/apple/verify/AppleJwtParser.java +++ b/src/main/java/org/kkumulkkum/server/api/auth/service/verify/AppleJwtParser.java @@ -1,11 +1,10 @@ -package org.kkumulkkum.server.auth.openfeign.apple.verify; +package org.kkumulkkum.server.api.auth.service.verify; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import io.jsonwebtoken.*; -import lombok.extern.slf4j.Slf4j; -import org.kkumulkkum.server.exception.AuthException; -import org.kkumulkkum.server.exception.code.AuthErrorCode; +import org.kkumulkkum.server.common.exception.AuthException; +import org.kkumulkkum.server.common.exception.code.AuthErrorCode; import org.springframework.stereotype.Component; import java.security.PublicKey; diff --git a/src/main/java/org/kkumulkkum/server/auth/openfeign/apple/verify/PublicKeyGenerator.java b/src/main/java/org/kkumulkkum/server/api/auth/service/verify/PublicKeyGenerator.java similarity index 84% rename from src/main/java/org/kkumulkkum/server/auth/openfeign/apple/verify/PublicKeyGenerator.java rename to src/main/java/org/kkumulkkum/server/api/auth/service/verify/PublicKeyGenerator.java index 013a2fc..797d567 100644 --- a/src/main/java/org/kkumulkkum/server/auth/openfeign/apple/verify/PublicKeyGenerator.java +++ b/src/main/java/org/kkumulkkum/server/api/auth/service/verify/PublicKeyGenerator.java @@ -1,9 +1,9 @@ -package org.kkumulkkum.server.auth.openfeign.apple.verify; +package org.kkumulkkum.server.api.auth.service.verify; -import org.kkumulkkum.server.auth.openfeign.apple.dto.ApplePublicKey; -import org.kkumulkkum.server.auth.openfeign.apple.dto.ApplePublicKeys; -import org.kkumulkkum.server.exception.AuthException; -import org.kkumulkkum.server.exception.code.AuthErrorCode; +import org.kkumulkkum.server.api.auth.dto.verify.ApplePublicKey; +import org.kkumulkkum.server.api.auth.dto.verify.ApplePublicKeys; +import org.kkumulkkum.server.common.exception.AuthException; +import org.kkumulkkum.server.common.exception.code.AuthErrorCode; import org.springframework.stereotype.Component; import java.math.BigInteger; diff --git a/src/main/java/org/kkumulkkum/server/controller/TestController.java b/src/main/java/org/kkumulkkum/server/api/common/TestController.java similarity index 63% rename from src/main/java/org/kkumulkkum/server/controller/TestController.java rename to src/main/java/org/kkumulkkum/server/api/common/TestController.java index 97cff66..6c33727 100644 --- a/src/main/java/org/kkumulkkum/server/controller/TestController.java +++ b/src/main/java/org/kkumulkkum/server/api/common/TestController.java @@ -1,15 +1,13 @@ -package org.kkumulkkum.server.controller; +package org.kkumulkkum.server.api.common; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.auth.jwt.JwtTokenProvider; -import org.kkumulkkum.server.dto.auth.response.JwtTokenDto; -import org.kkumulkkum.server.dto.test.TestDto; -import org.kkumulkkum.server.exception.BusinessException; -import org.kkumulkkum.server.exception.code.BusinessErrorCode; +import org.kkumulkkum.server.common.auth.jwt.JwtTokenProvider; +import org.kkumulkkum.server.api.auth.dto.response.JwtTokenDto; +import org.kkumulkkum.server.common.exception.BusinessException; +import org.kkumulkkum.server.common.exception.code.BusinessErrorCode; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @@ -18,11 +16,6 @@ public class TestController { private final JwtTokenProvider jwtTokenProvider; - @GetMapping("/v1/test/dto") - public ResponseEntity testDto() { - return ResponseEntity.ok(new TestDto("test")); - } - @GetMapping("/v1/test/default") public ResponseEntity testDefault() { throw new RuntimeException(); diff --git a/src/main/java/org/kkumulkkum/server/dto/common/ErrorDto.java b/src/main/java/org/kkumulkkum/server/api/common/dto/ErrorDto.java similarity index 79% rename from src/main/java/org/kkumulkkum/server/dto/common/ErrorDto.java rename to src/main/java/org/kkumulkkum/server/api/common/dto/ErrorDto.java index 145f306..0eefedd 100644 --- a/src/main/java/org/kkumulkkum/server/dto/common/ErrorDto.java +++ b/src/main/java/org/kkumulkkum/server/api/common/dto/ErrorDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.dto.common; +package org.kkumulkkum.server.api.common.dto; public record ErrorDto( int code, diff --git a/src/main/java/org/kkumulkkum/server/dto/common/ResponseDto.java b/src/main/java/org/kkumulkkum/server/api/common/dto/ResponseDto.java similarity index 77% rename from src/main/java/org/kkumulkkum/server/dto/common/ResponseDto.java rename to src/main/java/org/kkumulkkum/server/api/common/dto/ResponseDto.java index 5b260ae..9371819 100644 --- a/src/main/java/org/kkumulkkum/server/dto/common/ResponseDto.java +++ b/src/main/java/org/kkumulkkum/server/api/common/dto/ResponseDto.java @@ -1,6 +1,6 @@ -package org.kkumulkkum.server.dto.common; +package org.kkumulkkum.server.api.common.dto; -import org.kkumulkkum.server.exception.code.DefaultErrorCode; +import org.kkumulkkum.server.common.exception.code.DefaultErrorCode; public record ResponseDto ( boolean success, diff --git a/src/main/java/org/kkumulkkum/server/controller/MeetingController.java b/src/main/java/org/kkumulkkum/server/api/meeting/controller/MeetingController.java similarity index 79% rename from src/main/java/org/kkumulkkum/server/controller/MeetingController.java rename to src/main/java/org/kkumulkkum/server/api/meeting/controller/MeetingController.java index 87f7c72..1b7aa66 100644 --- a/src/main/java/org/kkumulkkum/server/controller/MeetingController.java +++ b/src/main/java/org/kkumulkkum/server/api/meeting/controller/MeetingController.java @@ -1,17 +1,17 @@ -package org.kkumulkkum.server.controller; +package org.kkumulkkum.server.api.meeting.controller; import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.annotation.IsMemberByMeetingId; -import org.kkumulkkum.server.annotation.UserId; -import org.kkumulkkum.server.dto.meeting.request.MeetingCreateDto; -import org.kkumulkkum.server.dto.meeting.request.MeetingRegisterDto; -import org.kkumulkkum.server.dto.meeting.response.CreatedMeetingDto; -import org.kkumulkkum.server.dto.meeting.response.MeetingDto; -import org.kkumulkkum.server.dto.meeting.response.MeetingIdDto; -import org.kkumulkkum.server.dto.meeting.response.MeetingsDto; -import org.kkumulkkum.server.dto.member.response.MembersDto; -import org.kkumulkkum.server.service.meeting.MeetingService; +import org.kkumulkkum.server.common.auth.annotation.IsMemberByMeetingId; +import org.kkumulkkum.server.common.auth.annotation.UserId; +import org.kkumulkkum.server.api.meeting.dto.request.MeetingCreateDto; +import org.kkumulkkum.server.api.meeting.dto.request.MeetingRegisterDto; +import org.kkumulkkum.server.api.meeting.dto.response.CreatedMeetingDto; +import org.kkumulkkum.server.api.meeting.dto.response.MeetingDto; +import org.kkumulkkum.server.api.meeting.dto.response.MeetingIdDto; +import org.kkumulkkum.server.api.meeting.dto.response.MeetingsDto; +import org.kkumulkkum.server.api.meeting.dto.response.MembersDto; +import org.kkumulkkum.server.api.meeting.service.MeetingService; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; diff --git a/src/main/java/org/kkumulkkum/server/api/meeting/dto/MeetingMetCountDto.java b/src/main/java/org/kkumulkkum/server/api/meeting/dto/MeetingMetCountDto.java new file mode 100644 index 0000000..c61e72b --- /dev/null +++ b/src/main/java/org/kkumulkkum/server/api/meeting/dto/MeetingMetCountDto.java @@ -0,0 +1,9 @@ +package org.kkumulkkum.server.api.meeting.dto; + +import org.kkumulkkum.server.domain.meeting.Meeting; + +public record MeetingMetCountDto ( + Meeting meeting, + Long metCount +) { +} diff --git a/src/main/java/org/kkumulkkum/server/dto/meeting/request/MeetingCreateDto.java b/src/main/java/org/kkumulkkum/server/api/meeting/dto/request/MeetingCreateDto.java similarity index 77% rename from src/main/java/org/kkumulkkum/server/dto/meeting/request/MeetingCreateDto.java rename to src/main/java/org/kkumulkkum/server/api/meeting/dto/request/MeetingCreateDto.java index c027317..f21533a 100644 --- a/src/main/java/org/kkumulkkum/server/dto/meeting/request/MeetingCreateDto.java +++ b/src/main/java/org/kkumulkkum/server/api/meeting/dto/request/MeetingCreateDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.dto.meeting.request; +package org.kkumulkkum.server.api.meeting.dto.request; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; diff --git a/src/main/java/org/kkumulkkum/server/dto/meeting/request/MeetingRegisterDto.java b/src/main/java/org/kkumulkkum/server/api/meeting/dto/request/MeetingRegisterDto.java similarity index 55% rename from src/main/java/org/kkumulkkum/server/dto/meeting/request/MeetingRegisterDto.java rename to src/main/java/org/kkumulkkum/server/api/meeting/dto/request/MeetingRegisterDto.java index 27f60e1..8c6dc2f 100644 --- a/src/main/java/org/kkumulkkum/server/dto/meeting/request/MeetingRegisterDto.java +++ b/src/main/java/org/kkumulkkum/server/api/meeting/dto/request/MeetingRegisterDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.dto.meeting.request; +package org.kkumulkkum.server.api.meeting.dto.request; public record MeetingRegisterDto ( String invitationCode diff --git a/src/main/java/org/kkumulkkum/server/dto/meeting/response/CreatedMeetingDto.java b/src/main/java/org/kkumulkkum/server/api/meeting/dto/response/CreatedMeetingDto.java similarity index 62% rename from src/main/java/org/kkumulkkum/server/dto/meeting/response/CreatedMeetingDto.java rename to src/main/java/org/kkumulkkum/server/api/meeting/dto/response/CreatedMeetingDto.java index 97d945d..2ff230e 100644 --- a/src/main/java/org/kkumulkkum/server/dto/meeting/response/CreatedMeetingDto.java +++ b/src/main/java/org/kkumulkkum/server/api/meeting/dto/response/CreatedMeetingDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.dto.meeting.response; +package org.kkumulkkum.server.api.meeting.dto.response; public record CreatedMeetingDto( Long meetingId, diff --git a/src/main/java/org/kkumulkkum/server/dto/meeting/response/MeetingDto.java b/src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MeetingDto.java similarity index 84% rename from src/main/java/org/kkumulkkum/server/dto/meeting/response/MeetingDto.java rename to src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MeetingDto.java index 1a219a1..2fcf536 100644 --- a/src/main/java/org/kkumulkkum/server/dto/meeting/response/MeetingDto.java +++ b/src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MeetingDto.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.dto.meeting.response; +package org.kkumulkkum.server.api.meeting.dto.response; import com.fasterxml.jackson.annotation.JsonFormat; -import org.kkumulkkum.server.domain.Meeting; +import org.kkumulkkum.server.domain.meeting.Meeting; import java.time.LocalDateTime; diff --git a/src/main/java/org/kkumulkkum/server/dto/meeting/response/MeetingIdDto.java b/src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MeetingIdDto.java similarity index 60% rename from src/main/java/org/kkumulkkum/server/dto/meeting/response/MeetingIdDto.java rename to src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MeetingIdDto.java index eabbd58..dbed4ee 100644 --- a/src/main/java/org/kkumulkkum/server/dto/meeting/response/MeetingIdDto.java +++ b/src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MeetingIdDto.java @@ -1,6 +1,6 @@ -package org.kkumulkkum.server.dto.meeting.response; +package org.kkumulkkum.server.api.meeting.dto.response; -import org.kkumulkkum.server.domain.Meeting; +import org.kkumulkkum.server.domain.meeting.Meeting; public record MeetingIdDto( Long meetingId diff --git a/src/main/java/org/kkumulkkum/server/dto/meeting/response/MeetingsDto.java b/src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MeetingsDto.java similarity index 87% rename from src/main/java/org/kkumulkkum/server/dto/meeting/response/MeetingsDto.java rename to src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MeetingsDto.java index b718d8b..7b9a4ef 100644 --- a/src/main/java/org/kkumulkkum/server/dto/meeting/response/MeetingsDto.java +++ b/src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MeetingsDto.java @@ -1,6 +1,6 @@ -package org.kkumulkkum.server.dto.meeting.response; +package org.kkumulkkum.server.api.meeting.dto.response; -import org.kkumulkkum.server.domain.Meeting; +import org.kkumulkkum.server.domain.meeting.Meeting; import java.util.List; diff --git a/src/main/java/org/kkumulkkum/server/dto/member/response/MemberDto.java b/src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MemberDto.java similarity index 83% rename from src/main/java/org/kkumulkkum/server/dto/member/response/MemberDto.java rename to src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MemberDto.java index 77a9fcf..7274ded 100644 --- a/src/main/java/org/kkumulkkum/server/dto/member/response/MemberDto.java +++ b/src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MemberDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.dto.member.response; +package org.kkumulkkum.server.api.meeting.dto.response; public record MemberDto( Long memberId, diff --git a/src/main/java/org/kkumulkkum/server/dto/member/response/MembersDto.java b/src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MembersDto.java similarity index 83% rename from src/main/java/org/kkumulkkum/server/dto/member/response/MembersDto.java rename to src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MembersDto.java index 3875f92..aeab1c6 100644 --- a/src/main/java/org/kkumulkkum/server/dto/member/response/MembersDto.java +++ b/src/main/java/org/kkumulkkum/server/api/meeting/dto/response/MembersDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.dto.member.response; +package org.kkumulkkum.server.api.meeting.dto.response; import java.util.List; diff --git a/src/main/java/org/kkumulkkum/server/service/meeting/MeetingService.java b/src/main/java/org/kkumulkkum/server/api/meeting/service/MeetingService.java similarity index 76% rename from src/main/java/org/kkumulkkum/server/service/meeting/MeetingService.java rename to src/main/java/org/kkumulkkum/server/api/meeting/service/MeetingService.java index 939266c..d455f56 100644 --- a/src/main/java/org/kkumulkkum/server/service/meeting/MeetingService.java +++ b/src/main/java/org/kkumulkkum/server/api/meeting/service/MeetingService.java @@ -1,28 +1,31 @@ -package org.kkumulkkum.server.service.meeting; +package org.kkumulkkum.server.api.meeting.service; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.kkumulkkum.server.domain.Meeting; -import org.kkumulkkum.server.domain.Member; -import org.kkumulkkum.server.domain.Promise; -import org.kkumulkkum.server.dto.meeting.MeetingMetCountDto; -import org.kkumulkkum.server.dto.meeting.request.MeetingCreateDto; -import org.kkumulkkum.server.dto.meeting.request.MeetingRegisterDto; -import org.kkumulkkum.server.dto.meeting.response.CreatedMeetingDto; -import org.kkumulkkum.server.dto.meeting.response.MeetingDto; -import org.kkumulkkum.server.dto.meeting.response.MeetingsDto; -import org.kkumulkkum.server.dto.member.response.MemberDto; -import org.kkumulkkum.server.dto.member.response.MembersDto; -import org.kkumulkkum.server.exception.MeetingException; -import org.kkumulkkum.server.exception.code.MeetingErrorCode; -import org.kkumulkkum.server.service.member.MemberRemover; -import org.kkumulkkum.server.service.member.MemberRetreiver; -import org.kkumulkkum.server.service.member.MemberSaver; -import org.kkumulkkum.server.service.participant.ParticipantRemover; -import org.kkumulkkum.server.service.participant.ParticipantRetriever; -import org.kkumulkkum.server.service.promise.PromiseRemover; -import org.kkumulkkum.server.service.promise.PromiseRetriever; -import org.kkumulkkum.server.service.user.UserRetriever; +import org.kkumulkkum.server.domain.meeting.manager.MeetingEditor; +import org.kkumulkkum.server.domain.meeting.manager.MeetingRemover; +import org.kkumulkkum.server.domain.meeting.manager.MeetingRetriever; +import org.kkumulkkum.server.domain.meeting.manager.MeetingSaver; +import org.kkumulkkum.server.domain.member.manager.MemberRemover; +import org.kkumulkkum.server.domain.member.manager.MemberRetreiver; +import org.kkumulkkum.server.domain.member.manager.MemberSaver; +import org.kkumulkkum.server.domain.meeting.Meeting; +import org.kkumulkkum.server.domain.member.Member; +import org.kkumulkkum.server.api.meeting.dto.MeetingMetCountDto; +import org.kkumulkkum.server.api.meeting.dto.request.MeetingCreateDto; +import org.kkumulkkum.server.api.meeting.dto.request.MeetingRegisterDto; +import org.kkumulkkum.server.api.meeting.dto.response.CreatedMeetingDto; +import org.kkumulkkum.server.api.meeting.dto.response.MeetingDto; +import org.kkumulkkum.server.api.meeting.dto.response.MeetingsDto; +import org.kkumulkkum.server.api.meeting.dto.response.MemberDto; +import org.kkumulkkum.server.api.meeting.dto.response.MembersDto; +import org.kkumulkkum.server.common.exception.MeetingException; +import org.kkumulkkum.server.common.exception.code.MeetingErrorCode; +import org.kkumulkkum.server.domain.participant.manager.ParticipantRemover; +import org.kkumulkkum.server.domain.participant.manager.ParticipantRetriever; +import org.kkumulkkum.server.domain.promise.manager.PromiseRemover; +import org.kkumulkkum.server.domain.promise.manager.PromiseRetriever; +import org.kkumulkkum.server.domain.user.manager.UserRetriever; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/kkumulkkum/server/controller/ParticipantController.java b/src/main/java/org/kkumulkkum/server/api/participant/controller/ParticipantController.java similarity index 82% rename from src/main/java/org/kkumulkkum/server/controller/ParticipantController.java rename to src/main/java/org/kkumulkkum/server/api/participant/controller/ParticipantController.java index b682d47..08248b9 100644 --- a/src/main/java/org/kkumulkkum/server/controller/ParticipantController.java +++ b/src/main/java/org/kkumulkkum/server/api/participant/controller/ParticipantController.java @@ -1,15 +1,15 @@ -package org.kkumulkkum.server.controller; +package org.kkumulkkum.server.api.participant.controller; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.annotation.IsMemberByPromiseId; -import org.kkumulkkum.server.annotation.IsParticipant; -import org.kkumulkkum.server.annotation.UserId; -import org.kkumulkkum.server.dto.participant.request.PreparationInfoDto; -import org.kkumulkkum.server.dto.participant.response.AvailableParticipantsDto; -import org.kkumulkkum.server.dto.participant.response.LateComersDto; -import org.kkumulkkum.server.dto.participant.response.ParticipantsDto; -import org.kkumulkkum.server.dto.participant.response.PreparationStatusDto; -import org.kkumulkkum.server.service.participant.ParticipantService; +import org.kkumulkkum.server.common.auth.annotation.IsMemberByPromiseId; +import org.kkumulkkum.server.common.auth.annotation.IsParticipant; +import org.kkumulkkum.server.common.auth.annotation.UserId; +import org.kkumulkkum.server.api.participant.dto.request.PreparationInfoDto; +import org.kkumulkkum.server.api.participant.dto.response.AvailableParticipantsDto; +import org.kkumulkkum.server.api.participant.dto.response.LateComersDto; +import org.kkumulkkum.server.api.participant.dto.response.ParticipantsDto; +import org.kkumulkkum.server.api.participant.dto.response.PreparationStatusDto; +import org.kkumulkkum.server.api.participant.service.ParticipantService; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; diff --git a/src/main/java/org/kkumulkkum/server/dto/participant/ParticipantStatusUserInfoDto.java b/src/main/java/org/kkumulkkum/server/api/participant/dto/ParticipantStatusUserInfoDto.java similarity index 94% rename from src/main/java/org/kkumulkkum/server/dto/participant/ParticipantStatusUserInfoDto.java rename to src/main/java/org/kkumulkkum/server/api/participant/dto/ParticipantStatusUserInfoDto.java index 698355b..3359078 100644 --- a/src/main/java/org/kkumulkkum/server/dto/participant/ParticipantStatusUserInfoDto.java +++ b/src/main/java/org/kkumulkkum/server/api/participant/dto/ParticipantStatusUserInfoDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.dto.participant; +package org.kkumulkkum.server.api.participant.dto; import java.time.LocalDateTime; diff --git a/src/main/java/org/kkumulkkum/server/dto/participant/request/PreparationInfoDto.java b/src/main/java/org/kkumulkkum/server/api/participant/dto/request/PreparationInfoDto.java similarity index 77% rename from src/main/java/org/kkumulkkum/server/dto/participant/request/PreparationInfoDto.java rename to src/main/java/org/kkumulkkum/server/api/participant/dto/request/PreparationInfoDto.java index 7ee79a5..fedacdd 100644 --- a/src/main/java/org/kkumulkkum/server/dto/participant/request/PreparationInfoDto.java +++ b/src/main/java/org/kkumulkkum/server/api/participant/dto/request/PreparationInfoDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.dto.participant.request; +package org.kkumulkkum.server.api.participant.dto.request; import jakarta.validation.constraints.Size; diff --git a/src/main/java/org/kkumulkkum/server/dto/participant/response/AvailableParticipantsDto.java b/src/main/java/org/kkumulkkum/server/api/participant/dto/response/AvailableParticipantsDto.java similarity index 90% rename from src/main/java/org/kkumulkkum/server/dto/participant/response/AvailableParticipantsDto.java rename to src/main/java/org/kkumulkkum/server/api/participant/dto/response/AvailableParticipantsDto.java index c58e0c0..20c5bbc 100644 --- a/src/main/java/org/kkumulkkum/server/dto/participant/response/AvailableParticipantsDto.java +++ b/src/main/java/org/kkumulkkum/server/api/participant/dto/response/AvailableParticipantsDto.java @@ -1,6 +1,6 @@ -package org.kkumulkkum.server.dto.participant.response; +package org.kkumulkkum.server.api.participant.dto.response; -import org.kkumulkkum.server.dto.member.response.MemberDto; +import org.kkumulkkum.server.api.meeting.dto.response.MemberDto; import java.util.List; public record AvailableParticipantsDto( diff --git a/src/main/java/org/kkumulkkum/server/dto/participant/response/LateComerDto.java b/src/main/java/org/kkumulkkum/server/api/participant/dto/response/LateComerDto.java similarity index 83% rename from src/main/java/org/kkumulkkum/server/dto/participant/response/LateComerDto.java rename to src/main/java/org/kkumulkkum/server/api/participant/dto/response/LateComerDto.java index 70a744a..cf84f81 100644 --- a/src/main/java/org/kkumulkkum/server/dto/participant/response/LateComerDto.java +++ b/src/main/java/org/kkumulkkum/server/api/participant/dto/response/LateComerDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.dto.participant.response; +package org.kkumulkkum.server.api.participant.dto.response; public record LateComerDto( Long participantId, diff --git a/src/main/java/org/kkumulkkum/server/dto/participant/response/LateComersDto.java b/src/main/java/org/kkumulkkum/server/api/participant/dto/response/LateComersDto.java similarity index 81% rename from src/main/java/org/kkumulkkum/server/dto/participant/response/LateComersDto.java rename to src/main/java/org/kkumulkkum/server/api/participant/dto/response/LateComersDto.java index 61aa81a..94546e0 100644 --- a/src/main/java/org/kkumulkkum/server/dto/participant/response/LateComersDto.java +++ b/src/main/java/org/kkumulkkum/server/api/participant/dto/response/LateComersDto.java @@ -1,6 +1,6 @@ -package org.kkumulkkum.server.dto.participant.response; +package org.kkumulkkum.server.api.participant.dto.response; -import org.kkumulkkum.server.domain.Promise; +import org.kkumulkkum.server.domain.promise.Promise; import java.time.LocalDateTime; import java.util.List; diff --git a/src/main/java/org/kkumulkkum/server/dto/participant/response/ParticipantDto.java b/src/main/java/org/kkumulkkum/server/api/participant/dto/response/ParticipantDto.java similarity index 88% rename from src/main/java/org/kkumulkkum/server/dto/participant/response/ParticipantDto.java rename to src/main/java/org/kkumulkkum/server/api/participant/dto/response/ParticipantDto.java index 5a3a277..29770b1 100644 --- a/src/main/java/org/kkumulkkum/server/dto/participant/response/ParticipantDto.java +++ b/src/main/java/org/kkumulkkum/server/api/participant/dto/response/ParticipantDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.dto.participant.response; +package org.kkumulkkum.server.api.participant.dto.response; public record ParticipantDto( Long participantId, diff --git a/src/main/java/org/kkumulkkum/server/dto/participant/response/ParticipantsDto.java b/src/main/java/org/kkumulkkum/server/api/participant/dto/response/ParticipantsDto.java similarity index 84% rename from src/main/java/org/kkumulkkum/server/dto/participant/response/ParticipantsDto.java rename to src/main/java/org/kkumulkkum/server/api/participant/dto/response/ParticipantsDto.java index 2defecd..4485be2 100644 --- a/src/main/java/org/kkumulkkum/server/dto/participant/response/ParticipantsDto.java +++ b/src/main/java/org/kkumulkkum/server/api/participant/dto/response/ParticipantsDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.dto.participant.response; +package org.kkumulkkum.server.api.participant.dto.response; import java.util.List; diff --git a/src/main/java/org/kkumulkkum/server/dto/participant/response/PreparationStatusDto.java b/src/main/java/org/kkumulkkum/server/api/participant/dto/response/PreparationStatusDto.java similarity index 90% rename from src/main/java/org/kkumulkkum/server/dto/participant/response/PreparationStatusDto.java rename to src/main/java/org/kkumulkkum/server/api/participant/dto/response/PreparationStatusDto.java index 5e5f167..d85fbcf 100644 --- a/src/main/java/org/kkumulkkum/server/dto/participant/response/PreparationStatusDto.java +++ b/src/main/java/org/kkumulkkum/server/api/participant/dto/response/PreparationStatusDto.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.dto.participant.response; +package org.kkumulkkum.server.api.participant.dto.response; import com.fasterxml.jackson.annotation.JsonFormat; -import org.kkumulkkum.server.domain.Participant; +import org.kkumulkkum.server.domain.participant.Participant; import java.time.LocalDateTime; diff --git a/src/main/java/org/kkumulkkum/server/service/participant/ParticipantService.java b/src/main/java/org/kkumulkkum/server/api/participant/service/ParticipantService.java similarity index 87% rename from src/main/java/org/kkumulkkum/server/service/participant/ParticipantService.java rename to src/main/java/org/kkumulkkum/server/api/participant/service/ParticipantService.java index 76849d0..0b055f2 100644 --- a/src/main/java/org/kkumulkkum/server/service/participant/ParticipantService.java +++ b/src/main/java/org/kkumulkkum/server/api/participant/service/ParticipantService.java @@ -1,22 +1,25 @@ -package org.kkumulkkum.server.service.participant; +package org.kkumulkkum.server.api.participant.service; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.kkumulkkum.server.domain.Member; -import org.kkumulkkum.server.domain.Participant; -import org.kkumulkkum.server.domain.Promise; -import org.kkumulkkum.server.dto.member.response.MemberDto; -import org.kkumulkkum.server.dto.participant.ParticipantStatusUserInfoDto; -import org.kkumulkkum.server.dto.participant.request.PreparationInfoDto; -import org.kkumulkkum.server.dto.participant.response.*; -import org.kkumulkkum.server.exception.ParticipantException; -import org.kkumulkkum.server.exception.code.ParticipantErrorCode; -import org.kkumulkkum.server.external.FcmService; -import org.kkumulkkum.server.external.dto.FcmMessageDto; -import org.kkumulkkum.server.external.enums.FcmContent; -import org.kkumulkkum.server.service.member.MemberRetreiver; -import org.kkumulkkum.server.service.promise.PromiseRemover; -import org.kkumulkkum.server.service.promise.PromiseRetriever; +import org.kkumulkkum.server.domain.participant.manager.ParticipantEditor; +import org.kkumulkkum.server.domain.participant.manager.ParticipantRemover; +import org.kkumulkkum.server.domain.participant.manager.ParticipantRetriever; +import org.kkumulkkum.server.api.participant.dto.response.*; +import org.kkumulkkum.server.domain.member.Member; +import org.kkumulkkum.server.domain.participant.Participant; +import org.kkumulkkum.server.domain.promise.Promise; +import org.kkumulkkum.server.api.meeting.dto.response.MemberDto; +import org.kkumulkkum.server.api.participant.dto.ParticipantStatusUserInfoDto; +import org.kkumulkkum.server.api.participant.dto.request.PreparationInfoDto; +import org.kkumulkkum.server.common.exception.ParticipantException; +import org.kkumulkkum.server.common.exception.code.ParticipantErrorCode; +import org.kkumulkkum.server.external.service.fcm.FcmService; +import org.kkumulkkum.server.external.service.fcm.dto.FcmMessageDto; +import org.kkumulkkum.server.external.service.fcm.FcmContent; +import org.kkumulkkum.server.domain.member.manager.MemberRetreiver; +import org.kkumulkkum.server.domain.promise.manager.PromiseRemover; +import org.kkumulkkum.server.domain.promise.manager.PromiseRetriever; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/kkumulkkum/server/controller/PromiseController.java b/src/main/java/org/kkumulkkum/server/api/promise/controller/PromiseController.java similarity index 86% rename from src/main/java/org/kkumulkkum/server/controller/PromiseController.java rename to src/main/java/org/kkumulkkum/server/api/promise/controller/PromiseController.java index 1013d89..d7d924f 100644 --- a/src/main/java/org/kkumulkkum/server/controller/PromiseController.java +++ b/src/main/java/org/kkumulkkum/server/api/promise/controller/PromiseController.java @@ -1,14 +1,14 @@ -package org.kkumulkkum.server.controller; +package org.kkumulkkum.server.api.promise.controller; import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.annotation.IsMemberByMeetingId; -import org.kkumulkkum.server.annotation.IsMemberByPromiseId; -import org.kkumulkkum.server.annotation.IsParticipant; -import org.kkumulkkum.server.annotation.UserId; -import org.kkumulkkum.server.dto.promise.PromiseCreateDto; -import org.kkumulkkum.server.dto.promise.response.*; -import org.kkumulkkum.server.service.promise.PromiseService; +import org.kkumulkkum.server.common.auth.annotation.IsMemberByMeetingId; +import org.kkumulkkum.server.common.auth.annotation.IsMemberByPromiseId; +import org.kkumulkkum.server.common.auth.annotation.IsParticipant; +import org.kkumulkkum.server.common.auth.annotation.UserId; +import org.kkumulkkum.server.api.promise.dto.request.PromiseCreateDto; +import org.kkumulkkum.server.api.promise.dto.response.*; +import org.kkumulkkum.server.api.promise.service.PromiseService; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; diff --git a/src/main/java/org/kkumulkkum/server/dto/promise/PromiseCreateDto.java b/src/main/java/org/kkumulkkum/server/api/promise/dto/request/PromiseCreateDto.java similarity index 87% rename from src/main/java/org/kkumulkkum/server/dto/promise/PromiseCreateDto.java rename to src/main/java/org/kkumulkkum/server/api/promise/dto/request/PromiseCreateDto.java index 73623c7..5d30217 100644 --- a/src/main/java/org/kkumulkkum/server/dto/promise/PromiseCreateDto.java +++ b/src/main/java/org/kkumulkkum/server/api/promise/dto/request/PromiseCreateDto.java @@ -1,11 +1,11 @@ -package org.kkumulkkum.server.dto.promise; +package org.kkumulkkum.server.api.promise.dto.request; import com.fasterxml.jackson.annotation.JsonFormat; import jakarta.annotation.Nullable; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; -import org.kkumulkkum.server.domain.enums.DressUpLevel; +import org.kkumulkkum.server.domain.promise.DressUpLevel; import java.time.LocalDateTime; import java.util.List; diff --git a/src/main/java/org/kkumulkkum/server/dto/promise/response/MainPromiseDto.java b/src/main/java/org/kkumulkkum/server/api/promise/dto/response/MainPromiseDto.java similarity index 89% rename from src/main/java/org/kkumulkkum/server/dto/promise/response/MainPromiseDto.java rename to src/main/java/org/kkumulkkum/server/api/promise/dto/response/MainPromiseDto.java index 57905f8..466bd93 100644 --- a/src/main/java/org/kkumulkkum/server/dto/promise/response/MainPromiseDto.java +++ b/src/main/java/org/kkumulkkum/server/api/promise/dto/response/MainPromiseDto.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.dto.promise.response; +package org.kkumulkkum.server.api.promise.dto.response; import com.fasterxml.jackson.annotation.JsonFormat; -import org.kkumulkkum.server.domain.Promise; +import org.kkumulkkum.server.domain.promise.Promise; import java.time.LocalDateTime; import java.time.temporal.ChronoUnit; diff --git a/src/main/java/org/kkumulkkum/server/dto/promise/response/MainPromisesDto.java b/src/main/java/org/kkumulkkum/server/api/promise/dto/response/MainPromisesDto.java similarity index 75% rename from src/main/java/org/kkumulkkum/server/dto/promise/response/MainPromisesDto.java rename to src/main/java/org/kkumulkkum/server/api/promise/dto/response/MainPromisesDto.java index a8baa67..7109652 100644 --- a/src/main/java/org/kkumulkkum/server/dto/promise/response/MainPromisesDto.java +++ b/src/main/java/org/kkumulkkum/server/api/promise/dto/response/MainPromisesDto.java @@ -1,6 +1,6 @@ -package org.kkumulkkum.server.dto.promise.response; +package org.kkumulkkum.server.api.promise.dto.response; -import org.kkumulkkum.server.domain.Promise; +import org.kkumulkkum.server.domain.promise.Promise; import java.util.List; diff --git a/src/main/java/org/kkumulkkum/server/dto/promise/response/PromiseAddDto.java b/src/main/java/org/kkumulkkum/server/api/promise/dto/response/PromiseAddDto.java similarity index 88% rename from src/main/java/org/kkumulkkum/server/dto/promise/response/PromiseAddDto.java rename to src/main/java/org/kkumulkkum/server/api/promise/dto/response/PromiseAddDto.java index 343e235..70faaa3 100644 --- a/src/main/java/org/kkumulkkum/server/dto/promise/response/PromiseAddDto.java +++ b/src/main/java/org/kkumulkkum/server/api/promise/dto/response/PromiseAddDto.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.dto.promise.response; +package org.kkumulkkum.server.api.promise.dto.response; import com.fasterxml.jackson.annotation.JsonFormat; -import org.kkumulkkum.server.domain.Promise; +import org.kkumulkkum.server.domain.promise.Promise; import java.time.LocalDateTime; diff --git a/src/main/java/org/kkumulkkum/server/dto/promise/response/PromiseDetailDto.java b/src/main/java/org/kkumulkkum/server/api/promise/dto/response/PromiseDetailDto.java similarity index 90% rename from src/main/java/org/kkumulkkum/server/dto/promise/response/PromiseDetailDto.java rename to src/main/java/org/kkumulkkum/server/api/promise/dto/response/PromiseDetailDto.java index a162069..b341ed4 100644 --- a/src/main/java/org/kkumulkkum/server/dto/promise/response/PromiseDetailDto.java +++ b/src/main/java/org/kkumulkkum/server/api/promise/dto/response/PromiseDetailDto.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.dto.promise.response; +package org.kkumulkkum.server.api.promise.dto.response; import com.fasterxml.jackson.annotation.JsonFormat; -import org.kkumulkkum.server.domain.Promise; +import org.kkumulkkum.server.domain.promise.Promise; import java.time.LocalDateTime; diff --git a/src/main/java/org/kkumulkkum/server/dto/promise/response/PromisesDto.java b/src/main/java/org/kkumulkkum/server/api/promise/dto/response/PromisesDto.java similarity index 91% rename from src/main/java/org/kkumulkkum/server/dto/promise/response/PromisesDto.java rename to src/main/java/org/kkumulkkum/server/api/promise/dto/response/PromisesDto.java index 6bafac8..3209e39 100644 --- a/src/main/java/org/kkumulkkum/server/dto/promise/response/PromisesDto.java +++ b/src/main/java/org/kkumulkkum/server/api/promise/dto/response/PromisesDto.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.dto.promise.response; +package org.kkumulkkum.server.api.promise.dto.response; import com.fasterxml.jackson.annotation.JsonFormat; -import org.kkumulkkum.server.domain.Promise; +import org.kkumulkkum.server.domain.promise.Promise; import java.time.LocalDateTime; import java.time.temporal.ChronoUnit; diff --git a/src/main/java/org/kkumulkkum/server/service/promise/PromiseService.java b/src/main/java/org/kkumulkkum/server/api/promise/service/PromiseService.java similarity index 87% rename from src/main/java/org/kkumulkkum/server/service/promise/PromiseService.java rename to src/main/java/org/kkumulkkum/server/api/promise/service/PromiseService.java index 3f42feb..0ba5c38 100644 --- a/src/main/java/org/kkumulkkum/server/service/promise/PromiseService.java +++ b/src/main/java/org/kkumulkkum/server/api/promise/service/PromiseService.java @@ -1,17 +1,25 @@ -package org.kkumulkkum.server.service.promise; +package org.kkumulkkum.server.api.promise.service; import jakarta.persistence.EntityManager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.*; -import org.kkumulkkum.server.dto.promise.PromiseCreateDto; -import org.kkumulkkum.server.dto.promise.response.*; -import org.kkumulkkum.server.exception.PromiseException; -import org.kkumulkkum.server.exception.code.PromiseErrorCode; -import org.kkumulkkum.server.service.member.MemberRetreiver; -import org.kkumulkkum.server.service.participant.ParticipantRemover; -import org.kkumulkkum.server.service.participant.ParticipantRetriever; -import org.kkumulkkum.server.service.participant.ParticipantSaver; -import org.kkumulkkum.server.service.userInfo.UserInfoRetriever; +import org.kkumulkkum.server.domain.promise.manager.PromiseEditor; +import org.kkumulkkum.server.domain.promise.manager.PromiseRemover; +import org.kkumulkkum.server.domain.promise.manager.PromiseRetriever; +import org.kkumulkkum.server.domain.promise.manager.PromiseSaver; +import org.kkumulkkum.server.api.promise.dto.response.*; +import org.kkumulkkum.server.domain.meeting.Meeting; +import org.kkumulkkum.server.domain.member.Member; +import org.kkumulkkum.server.domain.participant.Participant; +import org.kkumulkkum.server.domain.promise.Promise; +import org.kkumulkkum.server.domain.userinfo.UserInfo; +import org.kkumulkkum.server.api.promise.dto.request.PromiseCreateDto; +import org.kkumulkkum.server.common.exception.PromiseException; +import org.kkumulkkum.server.common.exception.code.PromiseErrorCode; +import org.kkumulkkum.server.domain.member.manager.MemberRetreiver; +import org.kkumulkkum.server.domain.participant.manager.ParticipantRemover; +import org.kkumulkkum.server.domain.participant.manager.ParticipantRetriever; +import org.kkumulkkum.server.domain.participant.manager.ParticipantSaver; +import org.kkumulkkum.server.domain.userinfo.manager.UserInfoRetriever; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/kkumulkkum/server/controller/UserController.java b/src/main/java/org/kkumulkkum/server/api/user/controller/UserController.java similarity index 75% rename from src/main/java/org/kkumulkkum/server/controller/UserController.java rename to src/main/java/org/kkumulkkum/server/api/user/controller/UserController.java index 9588aa3..b080d18 100644 --- a/src/main/java/org/kkumulkkum/server/controller/UserController.java +++ b/src/main/java/org/kkumulkkum/server/api/user/controller/UserController.java @@ -1,13 +1,13 @@ -package org.kkumulkkum.server.controller; +package org.kkumulkkum.server.api.user.controller; import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.annotation.UserId; -import org.kkumulkkum.server.dto.user.request.ImageUpdateDto; -import org.kkumulkkum.server.dto.user.request.NameUpdateDto; -import org.kkumulkkum.server.dto.user.response.UserDto; -import org.kkumulkkum.server.dto.user.response.UserNameDto; -import org.kkumulkkum.server.service.user.UserService; +import org.kkumulkkum.server.common.auth.annotation.UserId; +import org.kkumulkkum.server.api.user.dto.request.ImageUpdateDto; +import org.kkumulkkum.server.api.user.dto.request.NameUpdateDto; +import org.kkumulkkum.server.api.user.dto.response.UserDto; +import org.kkumulkkum.server.api.user.dto.response.UserNameDto; +import org.kkumulkkum.server.api.user.service.UserService; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; diff --git a/src/main/java/org/kkumulkkum/server/dto/user/request/ImageUpdateDto.java b/src/main/java/org/kkumulkkum/server/api/user/dto/request/ImageUpdateDto.java similarity index 78% rename from src/main/java/org/kkumulkkum/server/dto/user/request/ImageUpdateDto.java rename to src/main/java/org/kkumulkkum/server/api/user/dto/request/ImageUpdateDto.java index 84c5e7f..3816e16 100644 --- a/src/main/java/org/kkumulkkum/server/dto/user/request/ImageUpdateDto.java +++ b/src/main/java/org/kkumulkkum/server/api/user/dto/request/ImageUpdateDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.dto.user.request; +package org.kkumulkkum.server.api.user.dto.request; import jakarta.validation.constraints.NotNull; import org.springframework.web.multipart.MultipartFile; diff --git a/src/main/java/org/kkumulkkum/server/dto/user/request/NameUpdateDto.java b/src/main/java/org/kkumulkkum/server/api/user/dto/request/NameUpdateDto.java similarity index 77% rename from src/main/java/org/kkumulkkum/server/dto/user/request/NameUpdateDto.java rename to src/main/java/org/kkumulkkum/server/api/user/dto/request/NameUpdateDto.java index 445caf2..3a5ea08 100644 --- a/src/main/java/org/kkumulkkum/server/dto/user/request/NameUpdateDto.java +++ b/src/main/java/org/kkumulkkum/server/api/user/dto/request/NameUpdateDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.dto.user.request; +package org.kkumulkkum.server.api.user.dto.request; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; diff --git a/src/main/java/org/kkumulkkum/server/dto/user/response/UserDto.java b/src/main/java/org/kkumulkkum/server/api/user/dto/response/UserDto.java similarity index 84% rename from src/main/java/org/kkumulkkum/server/dto/user/response/UserDto.java rename to src/main/java/org/kkumulkkum/server/api/user/dto/response/UserDto.java index 0e0d86e..3ca0576 100644 --- a/src/main/java/org/kkumulkkum/server/dto/user/response/UserDto.java +++ b/src/main/java/org/kkumulkkum/server/api/user/dto/response/UserDto.java @@ -1,6 +1,6 @@ -package org.kkumulkkum.server.dto.user.response; +package org.kkumulkkum.server.api.user.dto.response; -import org.kkumulkkum.server.domain.UserInfo; +import org.kkumulkkum.server.domain.userinfo.UserInfo; public record UserDto( Long userId, diff --git a/src/main/java/org/kkumulkkum/server/dto/user/response/UserNameDto.java b/src/main/java/org/kkumulkkum/server/api/user/dto/response/UserNameDto.java similarity index 61% rename from src/main/java/org/kkumulkkum/server/dto/user/response/UserNameDto.java rename to src/main/java/org/kkumulkkum/server/api/user/dto/response/UserNameDto.java index 44e683b..f93ba10 100644 --- a/src/main/java/org/kkumulkkum/server/dto/user/response/UserNameDto.java +++ b/src/main/java/org/kkumulkkum/server/api/user/dto/response/UserNameDto.java @@ -1,6 +1,6 @@ -package org.kkumulkkum.server.dto.user.response; +package org.kkumulkkum.server.api.user.dto.response; -import org.kkumulkkum.server.domain.UserInfo; +import org.kkumulkkum.server.domain.userinfo.UserInfo; public record UserNameDto( String name diff --git a/src/main/java/org/kkumulkkum/server/service/user/UserService.java b/src/main/java/org/kkumulkkum/server/api/user/service/UserService.java similarity index 79% rename from src/main/java/org/kkumulkkum/server/service/user/UserService.java rename to src/main/java/org/kkumulkkum/server/api/user/service/UserService.java index cc97b46..a708df9 100644 --- a/src/main/java/org/kkumulkkum/server/service/user/UserService.java +++ b/src/main/java/org/kkumulkkum/server/api/user/service/UserService.java @@ -1,17 +1,17 @@ -package org.kkumulkkum.server.service.user; +package org.kkumulkkum.server.api.user.service; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.kkumulkkum.server.domain.UserInfo; -import org.kkumulkkum.server.dto.user.request.ImageUpdateDto; -import org.kkumulkkum.server.dto.user.request.NameUpdateDto; -import org.kkumulkkum.server.dto.user.response.UserDto; -import org.kkumulkkum.server.dto.user.response.UserNameDto; -import org.kkumulkkum.server.exception.AwsException; -import org.kkumulkkum.server.exception.code.AwsErrorCode; -import org.kkumulkkum.server.external.S3Service; -import org.kkumulkkum.server.service.userInfo.UserInfoEditor; -import org.kkumulkkum.server.service.userInfo.UserInfoRetriever; +import org.kkumulkkum.server.domain.userinfo.manager.UserInfoEditor; +import org.kkumulkkum.server.domain.userinfo.UserInfo; +import org.kkumulkkum.server.api.user.dto.request.ImageUpdateDto; +import org.kkumulkkum.server.api.user.dto.request.NameUpdateDto; +import org.kkumulkkum.server.api.user.dto.response.UserDto; +import org.kkumulkkum.server.api.user.dto.response.UserNameDto; +import org.kkumulkkum.server.common.exception.AwsException; +import org.kkumulkkum.server.common.exception.code.AwsErrorCode; +import org.kkumulkkum.server.external.service.s3.S3Service; +import org.kkumulkkum.server.domain.userinfo.manager.UserInfoRetriever; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/org/kkumulkkum/server/auth/openfeign/kakao/dto/KakaoAccount.java b/src/main/java/org/kkumulkkum/server/auth/openfeign/kakao/dto/KakaoAccount.java deleted file mode 100644 index c5ab69f..0000000 --- a/src/main/java/org/kkumulkkum/server/auth/openfeign/kakao/dto/KakaoAccount.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.kkumulkkum.server.auth.openfeign.kakao.dto; - -public record KakaoAccount( - String email -) { -} diff --git a/src/main/java/org/kkumulkkum/server/advice/ResponseDtoAdvice.java b/src/main/java/org/kkumulkkum/server/common/advice/ResponseDtoAdvice.java similarity index 84% rename from src/main/java/org/kkumulkkum/server/advice/ResponseDtoAdvice.java rename to src/main/java/org/kkumulkkum/server/common/advice/ResponseDtoAdvice.java index 9654001..6895f1a 100644 --- a/src/main/java/org/kkumulkkum/server/advice/ResponseDtoAdvice.java +++ b/src/main/java/org/kkumulkkum/server/common/advice/ResponseDtoAdvice.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.advice; +package org.kkumulkkum.server.common.advice; -import org.kkumulkkum.server.dto.common.ResponseDto; -import org.kkumulkkum.server.exception.code.DefaultErrorCode; +import org.kkumulkkum.server.api.common.dto.ResponseDto; +import org.kkumulkkum.server.common.exception.code.DefaultErrorCode; import org.springframework.core.MethodParameter; import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageConverter; @@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; +// TODO: 구현을 숨기고 이해를 어렵게한다는 이유로 곧 disable될 예정 @RestControllerAdvice(basePackages = "org.kkumulkkum.server") public class ResponseDtoAdvice implements ResponseBodyAdvice { diff --git a/src/main/java/org/kkumulkkum/server/annotation/IsMemberByMeetingId.java b/src/main/java/org/kkumulkkum/server/common/auth/annotation/IsMemberByMeetingId.java similarity index 84% rename from src/main/java/org/kkumulkkum/server/annotation/IsMemberByMeetingId.java rename to src/main/java/org/kkumulkkum/server/common/auth/annotation/IsMemberByMeetingId.java index 0fd8bf4..ca10021 100644 --- a/src/main/java/org/kkumulkkum/server/annotation/IsMemberByMeetingId.java +++ b/src/main/java/org/kkumulkkum/server/common/auth/annotation/IsMemberByMeetingId.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.annotation; +package org.kkumulkkum.server.common.auth.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/org/kkumulkkum/server/annotation/IsMemberByPromiseId.java b/src/main/java/org/kkumulkkum/server/common/auth/annotation/IsMemberByPromiseId.java similarity index 84% rename from src/main/java/org/kkumulkkum/server/annotation/IsMemberByPromiseId.java rename to src/main/java/org/kkumulkkum/server/common/auth/annotation/IsMemberByPromiseId.java index 3201cb2..5b8e7b1 100644 --- a/src/main/java/org/kkumulkkum/server/annotation/IsMemberByPromiseId.java +++ b/src/main/java/org/kkumulkkum/server/common/auth/annotation/IsMemberByPromiseId.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.annotation; +package org.kkumulkkum.server.common.auth.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/org/kkumulkkum/server/annotation/IsParticipant.java b/src/main/java/org/kkumulkkum/server/common/auth/annotation/IsParticipant.java similarity index 84% rename from src/main/java/org/kkumulkkum/server/annotation/IsParticipant.java rename to src/main/java/org/kkumulkkum/server/common/auth/annotation/IsParticipant.java index 7fb64cd..7bade6b 100644 --- a/src/main/java/org/kkumulkkum/server/annotation/IsParticipant.java +++ b/src/main/java/org/kkumulkkum/server/common/auth/annotation/IsParticipant.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.annotation; +package org.kkumulkkum.server.common.auth.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/org/kkumulkkum/server/annotation/UserId.java b/src/main/java/org/kkumulkkum/server/common/auth/annotation/UserId.java similarity index 66% rename from src/main/java/org/kkumulkkum/server/annotation/UserId.java rename to src/main/java/org/kkumulkkum/server/common/auth/annotation/UserId.java index 6956cfe..5511b8f 100644 --- a/src/main/java/org/kkumulkkum/server/annotation/UserId.java +++ b/src/main/java/org/kkumulkkum/server/common/auth/annotation/UserId.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.annotation; +package org.kkumulkkum.server.common.auth.annotation; import org.springframework.security.core.annotation.AuthenticationPrincipal; @@ -9,6 +9,6 @@ @Target(ElementType.PARAMETER) @Retention(RetentionPolicy.RUNTIME) -@AuthenticationPrincipal(expression="T(org.kkumulkkum.server.auth.jwt.JwtTokenProvider).checkPrincipal(#this)") +@AuthenticationPrincipal(expression="T(org.kkumulkkum.server.common.auth.jwt.JwtTokenProvider).checkPrincipal(#this)") public @interface UserId { } diff --git a/src/main/java/org/kkumulkkum/server/aspect/MemberCheckByMeetingIdAspect.java b/src/main/java/org/kkumulkkum/server/common/auth/aspect/MemberCheckByMeetingIdAspect.java similarity index 74% rename from src/main/java/org/kkumulkkum/server/aspect/MemberCheckByMeetingIdAspect.java rename to src/main/java/org/kkumulkkum/server/common/auth/aspect/MemberCheckByMeetingIdAspect.java index 0c6d508..1374a8c 100644 --- a/src/main/java/org/kkumulkkum/server/aspect/MemberCheckByMeetingIdAspect.java +++ b/src/main/java/org/kkumulkkum/server/common/auth/aspect/MemberCheckByMeetingIdAspect.java @@ -1,13 +1,13 @@ -package org.kkumulkkum.server.aspect; +package org.kkumulkkum.server.common.auth.aspect; import lombok.RequiredArgsConstructor; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; -import org.kkumulkkum.server.annotation.IsMemberByMeetingId; -import org.kkumulkkum.server.exception.MemberException; -import org.kkumulkkum.server.exception.code.MemberErrorCode; -import org.kkumulkkum.server.service.member.MemberRetreiver; +import org.kkumulkkum.server.common.auth.annotation.IsMemberByMeetingId; +import org.kkumulkkum.server.common.exception.MemberException; +import org.kkumulkkum.server.common.exception.code.MemberErrorCode; +import org.kkumulkkum.server.domain.member.manager.MemberRetreiver; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Component; diff --git a/src/main/java/org/kkumulkkum/server/aspect/MemberCheckByPromiseIdAspect.java b/src/main/java/org/kkumulkkum/server/common/auth/aspect/MemberCheckByPromiseIdAspect.java similarity index 74% rename from src/main/java/org/kkumulkkum/server/aspect/MemberCheckByPromiseIdAspect.java rename to src/main/java/org/kkumulkkum/server/common/auth/aspect/MemberCheckByPromiseIdAspect.java index 6caf630..befafa7 100644 --- a/src/main/java/org/kkumulkkum/server/aspect/MemberCheckByPromiseIdAspect.java +++ b/src/main/java/org/kkumulkkum/server/common/auth/aspect/MemberCheckByPromiseIdAspect.java @@ -1,13 +1,13 @@ -package org.kkumulkkum.server.aspect; +package org.kkumulkkum.server.common.auth.aspect; import lombok.RequiredArgsConstructor; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; -import org.kkumulkkum.server.annotation.IsMemberByPromiseId; -import org.kkumulkkum.server.exception.MemberException; -import org.kkumulkkum.server.exception.code.MemberErrorCode; -import org.kkumulkkum.server.service.member.MemberRetreiver; +import org.kkumulkkum.server.common.auth.annotation.IsMemberByPromiseId; +import org.kkumulkkum.server.common.exception.MemberException; +import org.kkumulkkum.server.common.exception.code.MemberErrorCode; +import org.kkumulkkum.server.domain.member.manager.MemberRetreiver; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Component; diff --git a/src/main/java/org/kkumulkkum/server/aspect/ParticipantCheckAspect.java b/src/main/java/org/kkumulkkum/server/common/auth/aspect/ParticipantCheckAspect.java similarity index 74% rename from src/main/java/org/kkumulkkum/server/aspect/ParticipantCheckAspect.java rename to src/main/java/org/kkumulkkum/server/common/auth/aspect/ParticipantCheckAspect.java index 552f76e..3e71e45 100644 --- a/src/main/java/org/kkumulkkum/server/aspect/ParticipantCheckAspect.java +++ b/src/main/java/org/kkumulkkum/server/common/auth/aspect/ParticipantCheckAspect.java @@ -1,13 +1,13 @@ -package org.kkumulkkum.server.aspect; +package org.kkumulkkum.server.common.auth.aspect; import lombok.RequiredArgsConstructor; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; -import org.kkumulkkum.server.annotation.IsParticipant; -import org.kkumulkkum.server.exception.ParticipantException; -import org.kkumulkkum.server.exception.code.ParticipantErrorCode; -import org.kkumulkkum.server.service.participant.ParticipantRetriever; +import org.kkumulkkum.server.common.auth.annotation.IsParticipant; +import org.kkumulkkum.server.common.exception.ParticipantException; +import org.kkumulkkum.server.common.exception.code.ParticipantErrorCode; +import org.kkumulkkum.server.domain.participant.manager.ParticipantRetriever; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Component; diff --git a/src/main/java/org/kkumulkkum/server/auth/UserAuthentication.java b/src/main/java/org/kkumulkkum/server/common/auth/authentication/UserAuthentication.java similarity index 91% rename from src/main/java/org/kkumulkkum/server/auth/UserAuthentication.java rename to src/main/java/org/kkumulkkum/server/common/auth/authentication/UserAuthentication.java index 8acb178..579b1cc 100644 --- a/src/main/java/org/kkumulkkum/server/auth/UserAuthentication.java +++ b/src/main/java/org/kkumulkkum/server/common/auth/authentication/UserAuthentication.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.auth; +package org.kkumulkkum.server.common.auth.authentication; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.GrantedAuthority; diff --git a/src/main/java/org/kkumulkkum/server/config/SecurityConfig.java b/src/main/java/org/kkumulkkum/server/common/auth/config/SecurityConfig.java similarity index 86% rename from src/main/java/org/kkumulkkum/server/config/SecurityConfig.java rename to src/main/java/org/kkumulkkum/server/common/auth/config/SecurityConfig.java index 19ef146..3001800 100644 --- a/src/main/java/org/kkumulkkum/server/config/SecurityConfig.java +++ b/src/main/java/org/kkumulkkum/server/common/auth/config/SecurityConfig.java @@ -1,10 +1,10 @@ -package org.kkumulkkum.server.config; +package org.kkumulkkum.server.common.auth.config; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.auth.CustomAccessDeniedHandler; -import org.kkumulkkum.server.auth.CustomJwtAuthenticationEntryPoint; -import org.kkumulkkum.server.auth.JwtAuthenticationFilter; -import org.kkumulkkum.server.auth.JwtExceptionFilter; +import org.kkumulkkum.server.common.auth.handler.CustomAccessDeniedHandler; +import org.kkumulkkum.server.common.auth.handler.CustomJwtAuthenticationEntryPoint; +import org.kkumulkkum.server.common.auth.filter.JwtAuthenticationFilter; +import org.kkumulkkum.server.common.auth.filter.JwtExceptionFilter; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; diff --git a/src/main/java/org/kkumulkkum/server/constant/AuthConstant.java b/src/main/java/org/kkumulkkum/server/common/auth/constant/AuthConstant.java similarity index 92% rename from src/main/java/org/kkumulkkum/server/constant/AuthConstant.java rename to src/main/java/org/kkumulkkum/server/common/auth/constant/AuthConstant.java index 2fb76b8..9517d3d 100644 --- a/src/main/java/org/kkumulkkum/server/constant/AuthConstant.java +++ b/src/main/java/org/kkumulkkum/server/common/auth/constant/AuthConstant.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.constant; +package org.kkumulkkum.server.common.auth.constant; import lombok.AccessLevel; import lombok.NoArgsConstructor; diff --git a/src/main/java/org/kkumulkkum/server/auth/JwtAuthenticationFilter.java b/src/main/java/org/kkumulkkum/server/common/auth/filter/JwtAuthenticationFilter.java similarity index 86% rename from src/main/java/org/kkumulkkum/server/auth/JwtAuthenticationFilter.java rename to src/main/java/org/kkumulkkum/server/common/auth/filter/JwtAuthenticationFilter.java index c859d82..6accedf 100644 --- a/src/main/java/org/kkumulkkum/server/auth/JwtAuthenticationFilter.java +++ b/src/main/java/org/kkumulkkum/server/common/auth/filter/JwtAuthenticationFilter.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.auth; +package org.kkumulkkum.server.common.auth.filter; import jakarta.servlet.FilterChain; import jakarta.servlet.ServletException; @@ -6,9 +6,10 @@ import jakarta.servlet.http.HttpServletResponse; import lombok.NonNull; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.auth.jwt.JwtTokenProvider; -import org.kkumulkkum.server.auth.jwt.JwtTokenValidator; -import org.kkumulkkum.server.constant.AuthConstant; +import org.kkumulkkum.server.common.auth.authentication.UserAuthentication; +import org.kkumulkkum.server.common.auth.jwt.JwtTokenProvider; +import org.kkumulkkum.server.common.auth.jwt.JwtTokenValidator; +import org.kkumulkkum.server.common.auth.constant.AuthConstant; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.web.authentication.WebAuthenticationDetailsSource; import org.springframework.stereotype.Component; diff --git a/src/main/java/org/kkumulkkum/server/auth/JwtExceptionFilter.java b/src/main/java/org/kkumulkkum/server/common/auth/filter/JwtExceptionFilter.java similarity index 86% rename from src/main/java/org/kkumulkkum/server/auth/JwtExceptionFilter.java rename to src/main/java/org/kkumulkkum/server/common/auth/filter/JwtExceptionFilter.java index acd7d08..0602b0a 100644 --- a/src/main/java/org/kkumulkkum/server/auth/JwtExceptionFilter.java +++ b/src/main/java/org/kkumulkkum/server/common/auth/filter/JwtExceptionFilter.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.auth; +package org.kkumulkkum.server.common.auth.filter; import io.jsonwebtoken.JwtException; import jakarta.servlet.FilterChain; @@ -7,9 +7,9 @@ import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.kkumulkkum.server.exception.AuthException; -import org.kkumulkkum.server.exception.code.AuthErrorCode; -import org.kkumulkkum.server.exception.code.BusinessErrorCode; +import org.kkumulkkum.server.common.exception.AuthException; +import org.kkumulkkum.server.common.exception.code.AuthErrorCode; +import org.kkumulkkum.server.common.exception.code.BusinessErrorCode; import org.springframework.stereotype.Component; import org.springframework.web.filter.OncePerRequestFilter; diff --git a/src/main/java/org/kkumulkkum/server/auth/CustomAccessDeniedHandler.java b/src/main/java/org/kkumulkkum/server/common/auth/handler/CustomAccessDeniedHandler.java similarity index 94% rename from src/main/java/org/kkumulkkum/server/auth/CustomAccessDeniedHandler.java rename to src/main/java/org/kkumulkkum/server/common/auth/handler/CustomAccessDeniedHandler.java index 2240569..824a27f 100644 --- a/src/main/java/org/kkumulkkum/server/auth/CustomAccessDeniedHandler.java +++ b/src/main/java/org/kkumulkkum/server/common/auth/handler/CustomAccessDeniedHandler.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.auth; +package org.kkumulkkum.server.common.auth.handler; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; diff --git a/src/main/java/org/kkumulkkum/server/auth/CustomJwtAuthenticationEntryPoint.java b/src/main/java/org/kkumulkkum/server/common/auth/handler/CustomJwtAuthenticationEntryPoint.java similarity index 86% rename from src/main/java/org/kkumulkkum/server/auth/CustomJwtAuthenticationEntryPoint.java rename to src/main/java/org/kkumulkkum/server/common/auth/handler/CustomJwtAuthenticationEntryPoint.java index 1c99b66..dc73549 100644 --- a/src/main/java/org/kkumulkkum/server/auth/CustomJwtAuthenticationEntryPoint.java +++ b/src/main/java/org/kkumulkkum/server/common/auth/handler/CustomJwtAuthenticationEntryPoint.java @@ -1,13 +1,13 @@ -package org.kkumulkkum.server.auth; +package org.kkumulkkum.server.common.auth.handler; import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.constant.AuthConstant; -import org.kkumulkkum.server.dto.common.ResponseDto; -import org.kkumulkkum.server.exception.code.AuthErrorCode; -import org.kkumulkkum.server.exception.code.DefaultErrorCode; +import org.kkumulkkum.server.common.auth.constant.AuthConstant; +import org.kkumulkkum.server.api.common.dto.ResponseDto; +import org.kkumulkkum.server.common.exception.code.AuthErrorCode; +import org.kkumulkkum.server.common.exception.code.DefaultErrorCode; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.security.core.AuthenticationException; diff --git a/src/main/java/org/kkumulkkum/server/auth/jwt/JwtTokenProvider.java b/src/main/java/org/kkumulkkum/server/common/auth/jwt/JwtTokenProvider.java similarity index 89% rename from src/main/java/org/kkumulkkum/server/auth/jwt/JwtTokenProvider.java rename to src/main/java/org/kkumulkkum/server/common/auth/jwt/JwtTokenProvider.java index a568346..9b2e323 100644 --- a/src/main/java/org/kkumulkkum/server/auth/jwt/JwtTokenProvider.java +++ b/src/main/java/org/kkumulkkum/server/common/auth/jwt/JwtTokenProvider.java @@ -1,13 +1,13 @@ -package org.kkumulkkum.server.auth.jwt; +package org.kkumulkkum.server.common.auth.jwt; import io.jsonwebtoken.Claims; import io.jsonwebtoken.Header; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.security.Keys; -import org.kkumulkkum.server.constant.AuthConstant; -import org.kkumulkkum.server.dto.auth.response.JwtTokenDto; -import org.kkumulkkum.server.exception.AuthException; -import org.kkumulkkum.server.exception.code.AuthErrorCode; +import org.kkumulkkum.server.common.auth.constant.AuthConstant; +import org.kkumulkkum.server.api.auth.dto.response.JwtTokenDto; +import org.kkumulkkum.server.common.exception.AuthException; +import org.kkumulkkum.server.common.exception.code.AuthErrorCode; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; diff --git a/src/main/java/org/kkumulkkum/server/auth/jwt/JwtTokenValidator.java b/src/main/java/org/kkumulkkum/server/common/auth/jwt/JwtTokenValidator.java similarity index 87% rename from src/main/java/org/kkumulkkum/server/auth/jwt/JwtTokenValidator.java rename to src/main/java/org/kkumulkkum/server/common/auth/jwt/JwtTokenValidator.java index 9bb8d27..dc4f5bd 100644 --- a/src/main/java/org/kkumulkkum/server/auth/jwt/JwtTokenValidator.java +++ b/src/main/java/org/kkumulkkum/server/common/auth/jwt/JwtTokenValidator.java @@ -1,11 +1,11 @@ -package org.kkumulkkum.server.auth.jwt; +package org.kkumulkkum.server.common.auth.jwt; import io.jsonwebtoken.ExpiredJwtException; import io.jsonwebtoken.MalformedJwtException; import io.jsonwebtoken.UnsupportedJwtException; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.exception.AuthException; -import org.kkumulkkum.server.exception.code.AuthErrorCode; +import org.kkumulkkum.server.common.exception.AuthException; +import org.kkumulkkum.server.common.exception.code.AuthErrorCode; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/config/AsyncConfig.java b/src/main/java/org/kkumulkkum/server/common/config/AsyncConfig.java similarity index 94% rename from src/main/java/org/kkumulkkum/server/config/AsyncConfig.java rename to src/main/java/org/kkumulkkum/server/common/config/AsyncConfig.java index a3b18b2..fcfba4c 100644 --- a/src/main/java/org/kkumulkkum/server/config/AsyncConfig.java +++ b/src/main/java/org/kkumulkkum/server/common/config/AsyncConfig.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.config; +package org.kkumulkkum.server.common.config; import org.springframework.context.annotation.Configuration; import org.springframework.scheduling.annotation.AsyncConfigurer; diff --git a/src/main/java/org/kkumulkkum/server/config/JpaAuditingConfig.java b/src/main/java/org/kkumulkkum/server/common/config/JpaAuditingConfig.java similarity index 82% rename from src/main/java/org/kkumulkkum/server/config/JpaAuditingConfig.java rename to src/main/java/org/kkumulkkum/server/common/config/JpaAuditingConfig.java index 0a9e1b8..0a5fe13 100644 --- a/src/main/java/org/kkumulkkum/server/config/JpaAuditingConfig.java +++ b/src/main/java/org/kkumulkkum/server/common/config/JpaAuditingConfig.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.config; +package org.kkumulkkum.server.common.config; import org.springframework.context.annotation.Configuration; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; diff --git a/src/main/java/org/kkumulkkum/server/exception/AuthException.java b/src/main/java/org/kkumulkkum/server/common/exception/AuthException.java similarity index 63% rename from src/main/java/org/kkumulkkum/server/exception/AuthException.java rename to src/main/java/org/kkumulkkum/server/common/exception/AuthException.java index c8d65cb..3b12eaf 100644 --- a/src/main/java/org/kkumulkkum/server/exception/AuthException.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/AuthException.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.exception; +package org.kkumulkkum.server.common.exception; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.exception.code.AuthErrorCode; +import org.kkumulkkum.server.common.exception.code.AuthErrorCode; @Getter @RequiredArgsConstructor diff --git a/src/main/java/org/kkumulkkum/server/exception/AwsException.java b/src/main/java/org/kkumulkkum/server/common/exception/AwsException.java similarity index 63% rename from src/main/java/org/kkumulkkum/server/exception/AwsException.java rename to src/main/java/org/kkumulkkum/server/common/exception/AwsException.java index 1db508e..9d1ed84 100644 --- a/src/main/java/org/kkumulkkum/server/exception/AwsException.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/AwsException.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.exception; +package org.kkumulkkum.server.common.exception; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.exception.code.AwsErrorCode; +import org.kkumulkkum.server.common.exception.code.AwsErrorCode; @Getter @RequiredArgsConstructor diff --git a/src/main/java/org/kkumulkkum/server/exception/BusinessException.java b/src/main/java/org/kkumulkkum/server/common/exception/BusinessException.java similarity index 63% rename from src/main/java/org/kkumulkkum/server/exception/BusinessException.java rename to src/main/java/org/kkumulkkum/server/common/exception/BusinessException.java index 245fcf2..24f611c 100644 --- a/src/main/java/org/kkumulkkum/server/exception/BusinessException.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/BusinessException.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.exception; +package org.kkumulkkum.server.common.exception; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.exception.code.BusinessErrorCode; +import org.kkumulkkum.server.common.exception.code.BusinessErrorCode; @Getter @RequiredArgsConstructor diff --git a/src/main/java/org/kkumulkkum/server/exception/FirebaseException.java b/src/main/java/org/kkumulkkum/server/common/exception/FirebaseException.java similarity index 63% rename from src/main/java/org/kkumulkkum/server/exception/FirebaseException.java rename to src/main/java/org/kkumulkkum/server/common/exception/FirebaseException.java index b8a4791..d0e68b1 100644 --- a/src/main/java/org/kkumulkkum/server/exception/FirebaseException.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/FirebaseException.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.exception; +package org.kkumulkkum.server.common.exception; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.exception.code.FirebaseErrorCode; +import org.kkumulkkum.server.common.exception.code.FirebaseErrorCode; @Getter @RequiredArgsConstructor diff --git a/src/main/java/org/kkumulkkum/server/exception/MeetingException.java b/src/main/java/org/kkumulkkum/server/common/exception/MeetingException.java similarity index 63% rename from src/main/java/org/kkumulkkum/server/exception/MeetingException.java rename to src/main/java/org/kkumulkkum/server/common/exception/MeetingException.java index 1ae20f4..b7691fd 100644 --- a/src/main/java/org/kkumulkkum/server/exception/MeetingException.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/MeetingException.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.exception; +package org.kkumulkkum.server.common.exception; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.exception.code.MeetingErrorCode; +import org.kkumulkkum.server.common.exception.code.MeetingErrorCode; @Getter @RequiredArgsConstructor diff --git a/src/main/java/org/kkumulkkum/server/exception/MemberException.java b/src/main/java/org/kkumulkkum/server/common/exception/MemberException.java similarity index 63% rename from src/main/java/org/kkumulkkum/server/exception/MemberException.java rename to src/main/java/org/kkumulkkum/server/common/exception/MemberException.java index d9d57fb..6464810 100644 --- a/src/main/java/org/kkumulkkum/server/exception/MemberException.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/MemberException.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.exception; +package org.kkumulkkum.server.common.exception; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.exception.code.MemberErrorCode; +import org.kkumulkkum.server.common.exception.code.MemberErrorCode; @Getter @RequiredArgsConstructor diff --git a/src/main/java/org/kkumulkkum/server/exception/OpenApiException.java b/src/main/java/org/kkumulkkum/server/common/exception/OpenApiException.java similarity index 63% rename from src/main/java/org/kkumulkkum/server/exception/OpenApiException.java rename to src/main/java/org/kkumulkkum/server/common/exception/OpenApiException.java index 532c82c..63a17fc 100644 --- a/src/main/java/org/kkumulkkum/server/exception/OpenApiException.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/OpenApiException.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.exception; +package org.kkumulkkum.server.common.exception; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.exception.code.OpenApiErrorCode; +import org.kkumulkkum.server.common.exception.code.OpenApiErrorCode; @Getter @RequiredArgsConstructor diff --git a/src/main/java/org/kkumulkkum/server/exception/ParticipantException.java b/src/main/java/org/kkumulkkum/server/common/exception/ParticipantException.java similarity index 63% rename from src/main/java/org/kkumulkkum/server/exception/ParticipantException.java rename to src/main/java/org/kkumulkkum/server/common/exception/ParticipantException.java index 541da77..9f86e62 100644 --- a/src/main/java/org/kkumulkkum/server/exception/ParticipantException.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/ParticipantException.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.exception; +package org.kkumulkkum.server.common.exception; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.exception.code.ParticipantErrorCode; +import org.kkumulkkum.server.common.exception.code.ParticipantErrorCode; @Getter @RequiredArgsConstructor diff --git a/src/main/java/org/kkumulkkum/server/exception/PromiseException.java b/src/main/java/org/kkumulkkum/server/common/exception/PromiseException.java similarity index 63% rename from src/main/java/org/kkumulkkum/server/exception/PromiseException.java rename to src/main/java/org/kkumulkkum/server/common/exception/PromiseException.java index 5a89b5a..d1dd784 100644 --- a/src/main/java/org/kkumulkkum/server/exception/PromiseException.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/PromiseException.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.exception; +package org.kkumulkkum.server.common.exception; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.exception.code.PromiseErrorCode; +import org.kkumulkkum.server.common.exception.code.PromiseErrorCode; @Getter @RequiredArgsConstructor diff --git a/src/main/java/org/kkumulkkum/server/exception/UserException.java b/src/main/java/org/kkumulkkum/server/common/exception/UserException.java similarity index 63% rename from src/main/java/org/kkumulkkum/server/exception/UserException.java rename to src/main/java/org/kkumulkkum/server/common/exception/UserException.java index 184098c..baa2a9c 100644 --- a/src/main/java/org/kkumulkkum/server/exception/UserException.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/UserException.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.exception; +package org.kkumulkkum.server.common.exception; import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.exception.code.UserErrorCode; +import org.kkumulkkum.server.common.exception.code.UserErrorCode; @Getter @RequiredArgsConstructor diff --git a/src/main/java/org/kkumulkkum/server/advice/GlobalExceptionHandler.java b/src/main/java/org/kkumulkkum/server/common/exception/advice/GlobalExceptionHandler.java similarity index 98% rename from src/main/java/org/kkumulkkum/server/advice/GlobalExceptionHandler.java rename to src/main/java/org/kkumulkkum/server/common/exception/advice/GlobalExceptionHandler.java index 15329b2..d575d65 100644 --- a/src/main/java/org/kkumulkkum/server/advice/GlobalExceptionHandler.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/advice/GlobalExceptionHandler.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.advice; +package org.kkumulkkum.server.common.exception.advice; import lombok.extern.slf4j.Slf4j; -import org.kkumulkkum.server.exception.*; -import org.kkumulkkum.server.exception.code.*; +import org.kkumulkkum.server.common.exception.*; +import org.kkumulkkum.server.common.exception.code.*; import org.springframework.http.ResponseEntity; import org.springframework.http.converter.HttpMessageNotReadableException; import org.springframework.web.HttpRequestMethodNotSupportedException; diff --git a/src/main/java/org/kkumulkkum/server/exception/code/AuthErrorCode.java b/src/main/java/org/kkumulkkum/server/common/exception/code/AuthErrorCode.java similarity index 97% rename from src/main/java/org/kkumulkkum/server/exception/code/AuthErrorCode.java rename to src/main/java/org/kkumulkkum/server/common/exception/code/AuthErrorCode.java index 5ac5cba..c534e7e 100644 --- a/src/main/java/org/kkumulkkum/server/exception/code/AuthErrorCode.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/code/AuthErrorCode.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.exception.code; +package org.kkumulkkum.server.common.exception.code; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/kkumulkkum/server/exception/code/AwsErrorCode.java b/src/main/java/org/kkumulkkum/server/common/exception/code/AwsErrorCode.java similarity index 92% rename from src/main/java/org/kkumulkkum/server/exception/code/AwsErrorCode.java rename to src/main/java/org/kkumulkkum/server/common/exception/code/AwsErrorCode.java index 517cfe8..99cfc9b 100644 --- a/src/main/java/org/kkumulkkum/server/exception/code/AwsErrorCode.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/code/AwsErrorCode.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.exception.code; +package org.kkumulkkum.server.common.exception.code; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/kkumulkkum/server/exception/code/BusinessErrorCode.java b/src/main/java/org/kkumulkkum/server/common/exception/code/BusinessErrorCode.java similarity index 96% rename from src/main/java/org/kkumulkkum/server/exception/code/BusinessErrorCode.java rename to src/main/java/org/kkumulkkum/server/common/exception/code/BusinessErrorCode.java index 1b1a16c..c1dc5e0 100644 --- a/src/main/java/org/kkumulkkum/server/exception/code/BusinessErrorCode.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/code/BusinessErrorCode.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.exception.code; +package org.kkumulkkum.server.common.exception.code; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/kkumulkkum/server/exception/code/DefaultErrorCode.java b/src/main/java/org/kkumulkkum/server/common/exception/code/DefaultErrorCode.java similarity index 75% rename from src/main/java/org/kkumulkkum/server/exception/code/DefaultErrorCode.java rename to src/main/java/org/kkumulkkum/server/common/exception/code/DefaultErrorCode.java index e43eaeb..90f2d5d 100644 --- a/src/main/java/org/kkumulkkum/server/exception/code/DefaultErrorCode.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/code/DefaultErrorCode.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.exception.code; +package org.kkumulkkum.server.common.exception.code; import org.springframework.http.HttpStatus; diff --git a/src/main/java/org/kkumulkkum/server/exception/code/FirebaseErrorCode.java b/src/main/java/org/kkumulkkum/server/common/exception/code/FirebaseErrorCode.java similarity index 90% rename from src/main/java/org/kkumulkkum/server/exception/code/FirebaseErrorCode.java rename to src/main/java/org/kkumulkkum/server/common/exception/code/FirebaseErrorCode.java index 3a13bdf..03dd3f9 100644 --- a/src/main/java/org/kkumulkkum/server/exception/code/FirebaseErrorCode.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/code/FirebaseErrorCode.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.exception.code; +package org.kkumulkkum.server.common.exception.code; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/kkumulkkum/server/exception/code/MeetingErrorCode.java b/src/main/java/org/kkumulkkum/server/common/exception/code/MeetingErrorCode.java similarity index 92% rename from src/main/java/org/kkumulkkum/server/exception/code/MeetingErrorCode.java rename to src/main/java/org/kkumulkkum/server/common/exception/code/MeetingErrorCode.java index a554e99..363bdb1 100644 --- a/src/main/java/org/kkumulkkum/server/exception/code/MeetingErrorCode.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/code/MeetingErrorCode.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.exception.code; +package org.kkumulkkum.server.common.exception.code; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/kkumulkkum/server/exception/code/MemberErrorCode.java b/src/main/java/org/kkumulkkum/server/common/exception/code/MemberErrorCode.java similarity index 90% rename from src/main/java/org/kkumulkkum/server/exception/code/MemberErrorCode.java rename to src/main/java/org/kkumulkkum/server/common/exception/code/MemberErrorCode.java index 2ef9cd2..648d2ab 100644 --- a/src/main/java/org/kkumulkkum/server/exception/code/MemberErrorCode.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/code/MemberErrorCode.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.exception.code; +package org.kkumulkkum.server.common.exception.code; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/kkumulkkum/server/exception/code/OpenApiErrorCode.java b/src/main/java/org/kkumulkkum/server/common/exception/code/OpenApiErrorCode.java similarity index 91% rename from src/main/java/org/kkumulkkum/server/exception/code/OpenApiErrorCode.java rename to src/main/java/org/kkumulkkum/server/common/exception/code/OpenApiErrorCode.java index 25848c1..9e4abb4 100644 --- a/src/main/java/org/kkumulkkum/server/exception/code/OpenApiErrorCode.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/code/OpenApiErrorCode.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.exception.code; +package org.kkumulkkum.server.common.exception.code; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/kkumulkkum/server/exception/code/ParticipantErrorCode.java b/src/main/java/org/kkumulkkum/server/common/exception/code/ParticipantErrorCode.java similarity index 92% rename from src/main/java/org/kkumulkkum/server/exception/code/ParticipantErrorCode.java rename to src/main/java/org/kkumulkkum/server/common/exception/code/ParticipantErrorCode.java index 9e223d6..608dffd 100644 --- a/src/main/java/org/kkumulkkum/server/exception/code/ParticipantErrorCode.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/code/ParticipantErrorCode.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.exception.code; +package org.kkumulkkum.server.common.exception.code; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/kkumulkkum/server/exception/code/PromiseErrorCode.java b/src/main/java/org/kkumulkkum/server/common/exception/code/PromiseErrorCode.java similarity index 92% rename from src/main/java/org/kkumulkkum/server/exception/code/PromiseErrorCode.java rename to src/main/java/org/kkumulkkum/server/common/exception/code/PromiseErrorCode.java index 48750ae..aaa783f 100644 --- a/src/main/java/org/kkumulkkum/server/exception/code/PromiseErrorCode.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/code/PromiseErrorCode.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.exception.code; +package org.kkumulkkum.server.common.exception.code; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/kkumulkkum/server/exception/code/UserErrorCode.java b/src/main/java/org/kkumulkkum/server/common/exception/code/UserErrorCode.java similarity index 87% rename from src/main/java/org/kkumulkkum/server/exception/code/UserErrorCode.java rename to src/main/java/org/kkumulkkum/server/common/exception/code/UserErrorCode.java index f848831..ae3eb08 100644 --- a/src/main/java/org/kkumulkkum/server/exception/code/UserErrorCode.java +++ b/src/main/java/org/kkumulkkum/server/common/exception/code/UserErrorCode.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.exception.code; +package org.kkumulkkum.server.common.exception.code; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/kkumulkkum/server/config/FilterConfig.java b/src/main/java/org/kkumulkkum/server/common/log/config/LogFilterConfig.java similarity index 79% rename from src/main/java/org/kkumulkkum/server/config/FilterConfig.java rename to src/main/java/org/kkumulkkum/server/common/log/config/LogFilterConfig.java index 5a705c6..b4e8889 100644 --- a/src/main/java/org/kkumulkkum/server/config/FilterConfig.java +++ b/src/main/java/org/kkumulkkum/server/common/log/config/LogFilterConfig.java @@ -1,13 +1,13 @@ -package org.kkumulkkum.server.config; +package org.kkumulkkum.server.common.log.config; -import org.kkumulkkum.server.log.filter.ServletWrappingFilter; -import org.kkumulkkum.server.log.filter.MDCFilter; +import org.kkumulkkum.server.common.log.filter.ServletWrappingFilter; +import org.kkumulkkum.server.common.log.filter.MDCFilter; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @Configuration -public class FilterConfig { +public class LogFilterConfig { @Bean public FilterRegistrationBean secondFilter() { FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean<>( diff --git a/src/main/java/org/kkumulkkum/server/log/discord/DiscordAppender.java b/src/main/java/org/kkumulkkum/server/common/log/discord/DiscordAppender.java similarity index 92% rename from src/main/java/org/kkumulkkum/server/log/discord/DiscordAppender.java rename to src/main/java/org/kkumulkkum/server/common/log/discord/DiscordAppender.java index 109a0e0..f13c4d0 100644 --- a/src/main/java/org/kkumulkkum/server/log/discord/DiscordAppender.java +++ b/src/main/java/org/kkumulkkum/server/common/log/discord/DiscordAppender.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.log.discord; +package org.kkumulkkum.server.common.log.discord; import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.classic.spi.IThrowableProxy; @@ -7,11 +7,11 @@ import io.micrometer.core.instrument.util.StringEscapeUtils; import lombok.Setter; import lombok.extern.slf4j.Slf4j; -import org.kkumulkkum.server.exception.BusinessException; -import org.kkumulkkum.server.exception.code.BusinessErrorCode; -import org.kkumulkkum.server.log.model.EmbedObject; -import org.kkumulkkum.server.log.util.MDCUtil; -import org.kkumulkkum.server.log.util.StringUtil; +import org.kkumulkkum.server.common.exception.BusinessException; +import org.kkumulkkum.server.common.exception.code.BusinessErrorCode; +import org.kkumulkkum.server.common.log.model.EmbedObject; +import org.kkumulkkum.server.common.log.util.MDCUtil; +import org.kkumulkkum.server.common.log.util.StringUtil; import java.awt.*; import java.io.IOException; diff --git a/src/main/java/org/kkumulkkum/server/log/discord/DiscordWebHook.java b/src/main/java/org/kkumulkkum/server/common/log/discord/DiscordWebHook.java similarity index 93% rename from src/main/java/org/kkumulkkum/server/log/discord/DiscordWebHook.java rename to src/main/java/org/kkumulkkum/server/common/log/discord/DiscordWebHook.java index 2de5e2a..751e1f8 100644 --- a/src/main/java/org/kkumulkkum/server/log/discord/DiscordWebHook.java +++ b/src/main/java/org/kkumulkkum/server/common/log/discord/DiscordWebHook.java @@ -1,10 +1,10 @@ -package org.kkumulkkum.server.log.discord; +package org.kkumulkkum.server.common.log.discord; -import org.kkumulkkum.server.exception.BusinessException; -import org.kkumulkkum.server.exception.code.BusinessErrorCode; -import org.kkumulkkum.server.log.model.*; -import org.kkumulkkum.server.log.model.Image; -import org.kkumulkkum.server.log.util.ApiCallUtil; +import org.kkumulkkum.server.common.exception.BusinessException; +import org.kkumulkkum.server.common.exception.code.BusinessErrorCode; +import org.kkumulkkum.server.common.log.model.*; +import org.kkumulkkum.server.common.log.model.Image; +import org.kkumulkkum.server.common.log.util.ApiCallUtil; import java.awt.*; import java.io.IOException; diff --git a/src/main/java/org/kkumulkkum/server/log/filter/MDCFilter.java b/src/main/java/org/kkumulkkum/server/common/log/filter/MDCFilter.java similarity index 91% rename from src/main/java/org/kkumulkkum/server/log/filter/MDCFilter.java rename to src/main/java/org/kkumulkkum/server/common/log/filter/MDCFilter.java index fa0e029..fce0ba0 100644 --- a/src/main/java/org/kkumulkkum/server/log/filter/MDCFilter.java +++ b/src/main/java/org/kkumulkkum/server/common/log/filter/MDCFilter.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.log.filter; +package org.kkumulkkum.server.common.log.filter; import jakarta.servlet.FilterChain; import jakarta.servlet.ServletException; @@ -6,8 +6,8 @@ import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.kkumulkkum.server.log.util.HttpRequestUtil; -import org.kkumulkkum.server.log.util.MDCUtil; +import org.kkumulkkum.server.common.log.util.MDCUtil; +import org.kkumulkkum.server.common.log.util.HttpRequestUtil; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Component; import org.springframework.web.filter.OncePerRequestFilter; diff --git a/src/main/java/org/kkumulkkum/server/log/filter/ServletWrappingFilter.java b/src/main/java/org/kkumulkkum/server/common/log/filter/ServletWrappingFilter.java similarity index 90% rename from src/main/java/org/kkumulkkum/server/log/filter/ServletWrappingFilter.java rename to src/main/java/org/kkumulkkum/server/common/log/filter/ServletWrappingFilter.java index aeac431..3a9b099 100644 --- a/src/main/java/org/kkumulkkum/server/log/filter/ServletWrappingFilter.java +++ b/src/main/java/org/kkumulkkum/server/common/log/filter/ServletWrappingFilter.java @@ -1,10 +1,10 @@ -package org.kkumulkkum.server.log.filter; +package org.kkumulkkum.server.common.log.filter; import jakarta.servlet.FilterChain; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; -import org.kkumulkkum.server.log.wrapper.CachedBodyRequestWrapper; +import org.kkumulkkum.server.common.log.wrapper.CachedBodyRequestWrapper; import org.springframework.stereotype.Component; import org.springframework.web.filter.OncePerRequestFilter; diff --git a/src/main/java/org/kkumulkkum/server/log/model/Author.java b/src/main/java/org/kkumulkkum/server/common/log/model/Author.java similarity index 81% rename from src/main/java/org/kkumulkkum/server/log/model/Author.java rename to src/main/java/org/kkumulkkum/server/common/log/model/Author.java index 8060663..055cd77 100644 --- a/src/main/java/org/kkumulkkum/server/log/model/Author.java +++ b/src/main/java/org/kkumulkkum/server/common/log/model/Author.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.log.model; +package org.kkumulkkum.server.common.log.model; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/kkumulkkum/server/log/model/EmbedObject.java b/src/main/java/org/kkumulkkum/server/common/log/model/EmbedObject.java similarity index 93% rename from src/main/java/org/kkumulkkum/server/log/model/EmbedObject.java rename to src/main/java/org/kkumulkkum/server/common/log/model/EmbedObject.java index b6b9b8b..81c5850 100644 --- a/src/main/java/org/kkumulkkum/server/log/model/EmbedObject.java +++ b/src/main/java/org/kkumulkkum/server/common/log/model/EmbedObject.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.log.model; +package org.kkumulkkum.server.common.log.model; import java.awt.*; import java.util.ArrayList; @@ -43,7 +43,7 @@ public class EmbedObject { /** * Discord Embed Message 사진 */ - private Image image; + private org.kkumulkkum.server.common.log.model.Image image; /** * Discord Embed Message 작성자 @@ -99,7 +99,7 @@ public EmbedObject setThumbnail(String url) { return this; } - public Image getImage() { + public org.kkumulkkum.server.common.log.model.Image getImage() { return image; } diff --git a/src/main/java/org/kkumulkkum/server/log/model/Field.java b/src/main/java/org/kkumulkkum/server/common/log/model/Field.java similarity index 81% rename from src/main/java/org/kkumulkkum/server/log/model/Field.java rename to src/main/java/org/kkumulkkum/server/common/log/model/Field.java index 7ec22ef..d3945c3 100644 --- a/src/main/java/org/kkumulkkum/server/log/model/Field.java +++ b/src/main/java/org/kkumulkkum/server/common/log/model/Field.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.log.model; +package org.kkumulkkum.server.common.log.model; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/kkumulkkum/server/log/model/Footer.java b/src/main/java/org/kkumulkkum/server/common/log/model/Footer.java similarity index 79% rename from src/main/java/org/kkumulkkum/server/log/model/Footer.java rename to src/main/java/org/kkumulkkum/server/common/log/model/Footer.java index d05b2f1..3e95665 100644 --- a/src/main/java/org/kkumulkkum/server/log/model/Footer.java +++ b/src/main/java/org/kkumulkkum/server/common/log/model/Footer.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.log.model; +package org.kkumulkkum.server.common.log.model; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/kkumulkkum/server/log/model/Image.java b/src/main/java/org/kkumulkkum/server/common/log/model/Image.java similarity index 75% rename from src/main/java/org/kkumulkkum/server/log/model/Image.java rename to src/main/java/org/kkumulkkum/server/common/log/model/Image.java index 1db0ae7..5189f41 100644 --- a/src/main/java/org/kkumulkkum/server/log/model/Image.java +++ b/src/main/java/org/kkumulkkum/server/common/log/model/Image.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.log.model; +package org.kkumulkkum.server.common.log.model; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/kkumulkkum/server/log/model/JsonObject.java b/src/main/java/org/kkumulkkum/server/common/log/model/JsonObject.java similarity index 97% rename from src/main/java/org/kkumulkkum/server/log/model/JsonObject.java rename to src/main/java/org/kkumulkkum/server/common/log/model/JsonObject.java index ac33163..88ab91b 100644 --- a/src/main/java/org/kkumulkkum/server/log/model/JsonObject.java +++ b/src/main/java/org/kkumulkkum/server/common/log/model/JsonObject.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.log.model; +package org.kkumulkkum.server.common.log.model; import java.lang.reflect.Array; import java.util.HashMap; diff --git a/src/main/java/org/kkumulkkum/server/log/model/Thumbnail.java b/src/main/java/org/kkumulkkum/server/common/log/model/Thumbnail.java similarity index 76% rename from src/main/java/org/kkumulkkum/server/log/model/Thumbnail.java rename to src/main/java/org/kkumulkkum/server/common/log/model/Thumbnail.java index 5788116..24262ea 100644 --- a/src/main/java/org/kkumulkkum/server/log/model/Thumbnail.java +++ b/src/main/java/org/kkumulkkum/server/common/log/model/Thumbnail.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.log.model; +package org.kkumulkkum.server.common.log.model; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/org/kkumulkkum/server/log/util/ApiCallUtil.java b/src/main/java/org/kkumulkkum/server/common/log/util/ApiCallUtil.java similarity index 91% rename from src/main/java/org/kkumulkkum/server/log/util/ApiCallUtil.java rename to src/main/java/org/kkumulkkum/server/common/log/util/ApiCallUtil.java index 0f18c77..8943e77 100644 --- a/src/main/java/org/kkumulkkum/server/log/util/ApiCallUtil.java +++ b/src/main/java/org/kkumulkkum/server/common/log/util/ApiCallUtil.java @@ -1,9 +1,9 @@ -package org.kkumulkkum.server.log.util; +package org.kkumulkkum.server.common.log.util; import lombok.AccessLevel; import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.kkumulkkum.server.log.model.JsonObject; +import org.kkumulkkum.server.common.log.model.JsonObject; import javax.net.ssl.HttpsURLConnection; import java.io.IOException; diff --git a/src/main/java/org/kkumulkkum/server/log/util/HttpRequestUtil.java b/src/main/java/org/kkumulkkum/server/common/log/util/HttpRequestUtil.java similarity index 96% rename from src/main/java/org/kkumulkkum/server/log/util/HttpRequestUtil.java rename to src/main/java/org/kkumulkkum/server/common/log/util/HttpRequestUtil.java index af6e6cd..23ccb33 100644 --- a/src/main/java/org/kkumulkkum/server/log/util/HttpRequestUtil.java +++ b/src/main/java/org/kkumulkkum/server/common/log/util/HttpRequestUtil.java @@ -1,11 +1,11 @@ -package org.kkumulkkum.server.log.util; +package org.kkumulkkum.server.common.log.util; import jakarta.servlet.http.Cookie; import jakarta.servlet.http.HttpServletRequest; import lombok.AccessLevel; import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.kkumulkkum.server.log.wrapper.CachedBodyRequestWrapper; +import org.kkumulkkum.server.common.log.wrapper.CachedBodyRequestWrapper; import org.springframework.web.client.RestTemplate; import org.springframework.web.util.WebUtils; diff --git a/src/main/java/org/kkumulkkum/server/log/util/MDCUtil.java b/src/main/java/org/kkumulkkum/server/common/log/util/MDCUtil.java similarity index 96% rename from src/main/java/org/kkumulkkum/server/log/util/MDCUtil.java rename to src/main/java/org/kkumulkkum/server/common/log/util/MDCUtil.java index 114f986..ac8546e 100644 --- a/src/main/java/org/kkumulkkum/server/log/util/MDCUtil.java +++ b/src/main/java/org/kkumulkkum/server/common/log/util/MDCUtil.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.log.util; +package org.kkumulkkum.server.common.log.util; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/src/main/java/org/kkumulkkum/server/log/util/StringUtil.java b/src/main/java/org/kkumulkkum/server/common/log/util/StringUtil.java similarity index 98% rename from src/main/java/org/kkumulkkum/server/log/util/StringUtil.java rename to src/main/java/org/kkumulkkum/server/common/log/util/StringUtil.java index 80fd85e..e1113bf 100644 --- a/src/main/java/org/kkumulkkum/server/log/util/StringUtil.java +++ b/src/main/java/org/kkumulkkum/server/common/log/util/StringUtil.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.log.util; +package org.kkumulkkum.server.common.log.util; import lombok.AccessLevel; import lombok.NoArgsConstructor; diff --git a/src/main/java/org/kkumulkkum/server/log/wrapper/CachedBodyRequestWrapper.java b/src/main/java/org/kkumulkkum/server/common/log/wrapper/CachedBodyRequestWrapper.java similarity index 95% rename from src/main/java/org/kkumulkkum/server/log/wrapper/CachedBodyRequestWrapper.java rename to src/main/java/org/kkumulkkum/server/common/log/wrapper/CachedBodyRequestWrapper.java index 12a1f10..cd7d9cd 100644 --- a/src/main/java/org/kkumulkkum/server/log/wrapper/CachedBodyRequestWrapper.java +++ b/src/main/java/org/kkumulkkum/server/common/log/wrapper/CachedBodyRequestWrapper.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.log.wrapper; +package org.kkumulkkum.server.common.log.wrapper; import jakarta.servlet.ServletInputStream; import jakarta.servlet.http.HttpServletRequest; diff --git a/src/main/java/org/kkumulkkum/server/log/wrapper/CachedBodyServletInputStream.java b/src/main/java/org/kkumulkkum/server/common/log/wrapper/CachedBodyServletInputStream.java similarity index 95% rename from src/main/java/org/kkumulkkum/server/log/wrapper/CachedBodyServletInputStream.java rename to src/main/java/org/kkumulkkum/server/common/log/wrapper/CachedBodyServletInputStream.java index 7b964dc..b76df2a 100644 --- a/src/main/java/org/kkumulkkum/server/log/wrapper/CachedBodyServletInputStream.java +++ b/src/main/java/org/kkumulkkum/server/common/log/wrapper/CachedBodyServletInputStream.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.log.wrapper; +package org.kkumulkkum.server.common.log.wrapper; import jakarta.servlet.ReadListener; import jakarta.servlet.ServletInputStream; diff --git a/src/main/java/org/kkumulkkum/server/domain/BaseTimeEntity.java b/src/main/java/org/kkumulkkum/server/domain/base/BaseTimeEntity.java similarity index 92% rename from src/main/java/org/kkumulkkum/server/domain/BaseTimeEntity.java rename to src/main/java/org/kkumulkkum/server/domain/base/BaseTimeEntity.java index b8764c5..17b35d0 100644 --- a/src/main/java/org/kkumulkkum/server/domain/BaseTimeEntity.java +++ b/src/main/java/org/kkumulkkum/server/domain/base/BaseTimeEntity.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.domain; +package org.kkumulkkum.server.domain.base; import jakarta.persistence.EntityListeners; import jakarta.persistence.MappedSuperclass; diff --git a/src/main/java/org/kkumulkkum/server/domain/enums/Role.java b/src/main/java/org/kkumulkkum/server/domain/enums/Role.java deleted file mode 100644 index 25d7251..0000000 --- a/src/main/java/org/kkumulkkum/server/domain/enums/Role.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.kkumulkkum.server.domain.enums; - -public enum Role { - USER, - ADMIN -} diff --git a/src/main/java/org/kkumulkkum/server/domain/Meeting.java b/src/main/java/org/kkumulkkum/server/domain/meeting/Meeting.java similarity index 83% rename from src/main/java/org/kkumulkkum/server/domain/Meeting.java rename to src/main/java/org/kkumulkkum/server/domain/meeting/Meeting.java index 7dbb3d4..bb2206b 100644 --- a/src/main/java/org/kkumulkkum/server/domain/Meeting.java +++ b/src/main/java/org/kkumulkkum/server/domain/meeting/Meeting.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.domain; +package org.kkumulkkum.server.domain.meeting; import jakarta.persistence.*; import lombok.AccessLevel; @@ -6,6 +6,8 @@ import lombok.Getter; import lombok.NoArgsConstructor; import org.hibernate.annotations.BatchSize; +import org.kkumulkkum.server.domain.member.Member; +import org.kkumulkkum.server.domain.base.BaseTimeEntity; import java.util.List; diff --git a/src/main/java/org/kkumulkkum/server/service/meeting/MeetingEditor.java b/src/main/java/org/kkumulkkum/server/domain/meeting/manager/MeetingEditor.java similarity index 66% rename from src/main/java/org/kkumulkkum/server/service/meeting/MeetingEditor.java rename to src/main/java/org/kkumulkkum/server/domain/meeting/manager/MeetingEditor.java index c67cc2a..bb72779 100644 --- a/src/main/java/org/kkumulkkum/server/service/meeting/MeetingEditor.java +++ b/src/main/java/org/kkumulkkum/server/domain/meeting/manager/MeetingEditor.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.service.meeting; +package org.kkumulkkum.server.domain.meeting.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.Meeting; -import org.kkumulkkum.server.dto.meeting.request.MeetingCreateDto; +import org.kkumulkkum.server.domain.meeting.Meeting; +import org.kkumulkkum.server.api.meeting.dto.request.MeetingCreateDto; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/service/meeting/MeetingRemover.java b/src/main/java/org/kkumulkkum/server/domain/meeting/manager/MeetingRemover.java similarity index 71% rename from src/main/java/org/kkumulkkum/server/service/meeting/MeetingRemover.java rename to src/main/java/org/kkumulkkum/server/domain/meeting/manager/MeetingRemover.java index a368041..04c9150 100644 --- a/src/main/java/org/kkumulkkum/server/service/meeting/MeetingRemover.java +++ b/src/main/java/org/kkumulkkum/server/domain/meeting/manager/MeetingRemover.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.service.meeting; +package org.kkumulkkum.server.domain.meeting.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.repository.MeetingRepository; +import org.kkumulkkum.server.domain.meeting.repository.MeetingRepository; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/service/meeting/MeetingRetriever.java b/src/main/java/org/kkumulkkum/server/domain/meeting/manager/MeetingRetriever.java similarity index 76% rename from src/main/java/org/kkumulkkum/server/service/meeting/MeetingRetriever.java rename to src/main/java/org/kkumulkkum/server/domain/meeting/manager/MeetingRetriever.java index 336c74d..ebee788 100644 --- a/src/main/java/org/kkumulkkum/server/service/meeting/MeetingRetriever.java +++ b/src/main/java/org/kkumulkkum/server/domain/meeting/manager/MeetingRetriever.java @@ -1,11 +1,11 @@ -package org.kkumulkkum.server.service.meeting; +package org.kkumulkkum.server.domain.meeting.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.Meeting; -import org.kkumulkkum.server.dto.meeting.MeetingMetCountDto; -import org.kkumulkkum.server.exception.MeetingException; -import org.kkumulkkum.server.exception.code.MeetingErrorCode; -import org.kkumulkkum.server.repository.MeetingRepository; +import org.kkumulkkum.server.domain.meeting.Meeting; +import org.kkumulkkum.server.api.meeting.dto.MeetingMetCountDto; +import org.kkumulkkum.server.common.exception.MeetingException; +import org.kkumulkkum.server.common.exception.code.MeetingErrorCode; +import org.kkumulkkum.server.domain.meeting.repository.MeetingRepository; import org.springframework.stereotype.Component; import java.util.List; diff --git a/src/main/java/org/kkumulkkum/server/service/meeting/MeetingSaver.java b/src/main/java/org/kkumulkkum/server/domain/meeting/manager/MeetingSaver.java similarity index 62% rename from src/main/java/org/kkumulkkum/server/service/meeting/MeetingSaver.java rename to src/main/java/org/kkumulkkum/server/domain/meeting/manager/MeetingSaver.java index 28426af..d7a5494 100644 --- a/src/main/java/org/kkumulkkum/server/service/meeting/MeetingSaver.java +++ b/src/main/java/org/kkumulkkum/server/domain/meeting/manager/MeetingSaver.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.service.meeting; +package org.kkumulkkum.server.domain.meeting.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.Meeting; -import org.kkumulkkum.server.repository.MeetingRepository; +import org.kkumulkkum.server.domain.meeting.Meeting; +import org.kkumulkkum.server.domain.meeting.repository.MeetingRepository; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/repository/MeetingRepository.java b/src/main/java/org/kkumulkkum/server/domain/meeting/repository/MeetingRepository.java similarity index 73% rename from src/main/java/org/kkumulkkum/server/repository/MeetingRepository.java rename to src/main/java/org/kkumulkkum/server/domain/meeting/repository/MeetingRepository.java index b8c89b8..1dac6ef 100644 --- a/src/main/java/org/kkumulkkum/server/repository/MeetingRepository.java +++ b/src/main/java/org/kkumulkkum/server/domain/meeting/repository/MeetingRepository.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.repository; +package org.kkumulkkum.server.domain.meeting.repository; -import org.kkumulkkum.server.domain.Meeting; -import org.kkumulkkum.server.dto.meeting.MeetingMetCountDto; +import org.kkumulkkum.server.domain.meeting.Meeting; +import org.kkumulkkum.server.api.meeting.dto.MeetingMetCountDto; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; @@ -18,7 +18,7 @@ public interface MeetingRepository extends JpaRepository { List findAllByUserId(Long userId); @Query(""" - SELECT new org.kkumulkkum.server.dto.meeting.MeetingMetCountDto (m, COUNT(p.id)) + SELECT new org.kkumulkkum.server.api.meeting.dto.MeetingMetCountDto (m, COUNT(p.id)) FROM Meeting m LEFT JOIN Promise p ON p.meeting.id = m.id AND p.isCompleted = true WHERE m.id = :meetingId diff --git a/src/main/java/org/kkumulkkum/server/domain/Member.java b/src/main/java/org/kkumulkkum/server/domain/member/Member.java similarity index 76% rename from src/main/java/org/kkumulkkum/server/domain/Member.java rename to src/main/java/org/kkumulkkum/server/domain/member/Member.java index 9522315..878c31c 100644 --- a/src/main/java/org/kkumulkkum/server/domain/Member.java +++ b/src/main/java/org/kkumulkkum/server/domain/member/Member.java @@ -1,10 +1,13 @@ -package org.kkumulkkum.server.domain; +package org.kkumulkkum.server.domain.member; import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; +import org.kkumulkkum.server.domain.user.User; +import org.kkumulkkum.server.domain.base.BaseTimeEntity; +import org.kkumulkkum.server.domain.meeting.Meeting; @Entity @Getter diff --git a/src/main/java/org/kkumulkkum/server/service/member/MemberRemover.java b/src/main/java/org/kkumulkkum/server/domain/member/manager/MemberRemover.java similarity index 71% rename from src/main/java/org/kkumulkkum/server/service/member/MemberRemover.java rename to src/main/java/org/kkumulkkum/server/domain/member/manager/MemberRemover.java index 31e9d14..932c52a 100644 --- a/src/main/java/org/kkumulkkum/server/service/member/MemberRemover.java +++ b/src/main/java/org/kkumulkkum/server/domain/member/manager/MemberRemover.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.service.member; +package org.kkumulkkum.server.domain.member.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.Member; -import org.kkumulkkum.server.repository.MemberRepository; +import org.kkumulkkum.server.domain.member.Member; +import org.kkumulkkum.server.domain.member.repository.MemberRepository; import org.springframework.stereotype.Component; import java.util.List; diff --git a/src/main/java/org/kkumulkkum/server/service/member/MemberRetreiver.java b/src/main/java/org/kkumulkkum/server/domain/member/manager/MemberRetreiver.java similarity index 81% rename from src/main/java/org/kkumulkkum/server/service/member/MemberRetreiver.java rename to src/main/java/org/kkumulkkum/server/domain/member/manager/MemberRetreiver.java index b1abb5d..5e380ec 100644 --- a/src/main/java/org/kkumulkkum/server/service/member/MemberRetreiver.java +++ b/src/main/java/org/kkumulkkum/server/domain/member/manager/MemberRetreiver.java @@ -1,11 +1,11 @@ -package org.kkumulkkum.server.service.member; +package org.kkumulkkum.server.domain.member.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.Member; -import org.kkumulkkum.server.dto.member.response.MemberDto; -import org.kkumulkkum.server.exception.MemberException; -import org.kkumulkkum.server.exception.code.MemberErrorCode; -import org.kkumulkkum.server.repository.MemberRepository; +import org.kkumulkkum.server.domain.member.Member; +import org.kkumulkkum.server.api.meeting.dto.response.MemberDto; +import org.kkumulkkum.server.common.exception.MemberException; +import org.kkumulkkum.server.common.exception.code.MemberErrorCode; +import org.kkumulkkum.server.domain.member.repository.MemberRepository; import org.springframework.stereotype.Component; import java.util.List; diff --git a/src/main/java/org/kkumulkkum/server/service/member/MemberSaver.java b/src/main/java/org/kkumulkkum/server/domain/member/manager/MemberSaver.java similarity index 63% rename from src/main/java/org/kkumulkkum/server/service/member/MemberSaver.java rename to src/main/java/org/kkumulkkum/server/domain/member/manager/MemberSaver.java index 75f988b..67a7a14 100644 --- a/src/main/java/org/kkumulkkum/server/service/member/MemberSaver.java +++ b/src/main/java/org/kkumulkkum/server/domain/member/manager/MemberSaver.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.service.member; +package org.kkumulkkum.server.domain.member.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.Member; -import org.kkumulkkum.server.repository.MemberRepository; +import org.kkumulkkum.server.domain.member.Member; +import org.kkumulkkum.server.domain.member.repository.MemberRepository; import org.springframework.stereotype.Component; diff --git a/src/main/java/org/kkumulkkum/server/repository/MemberRepository.java b/src/main/java/org/kkumulkkum/server/domain/member/repository/MemberRepository.java similarity index 85% rename from src/main/java/org/kkumulkkum/server/repository/MemberRepository.java rename to src/main/java/org/kkumulkkum/server/domain/member/repository/MemberRepository.java index a38a5b5..bfcbf61 100644 --- a/src/main/java/org/kkumulkkum/server/repository/MemberRepository.java +++ b/src/main/java/org/kkumulkkum/server/domain/member/repository/MemberRepository.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.repository; +package org.kkumulkkum.server.domain.member.repository; -import org.kkumulkkum.server.domain.Member; -import org.kkumulkkum.server.dto.member.response.MemberDto; +import org.kkumulkkum.server.domain.member.Member; +import org.kkumulkkum.server.api.meeting.dto.response.MemberDto; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; @@ -15,7 +15,7 @@ public interface MemberRepository extends JpaRepository { boolean existsByMeetingIdAndUserId(Long meetingId, Long userId); @Query(""" - SELECT new org.kkumulkkum.server.dto.member.response.MemberDto + SELECT new org.kkumulkkum.server.api.meeting.dto.response.MemberDto (m.id, ui.name, ui.profileImg) FROM Member m JOIN FETCH UserInfo ui ON m.user.id = ui.user.id @@ -51,7 +51,7 @@ SELECT CASE WHEN EXISTS ( Member findByUserIdAndPromiseId(Long userId, Long promiseId); @Query(""" - SELECT new org.kkumulkkum.server.dto.member.response.MemberDto + SELECT new org.kkumulkkum.server.api.meeting.dto.response.MemberDto (m.id, ui.name, ui.profileImg) FROM Member m JOIN m.meeting mt diff --git a/src/main/java/org/kkumulkkum/server/domain/Participant.java b/src/main/java/org/kkumulkkum/server/domain/participant/Participant.java similarity index 90% rename from src/main/java/org/kkumulkkum/server/domain/Participant.java rename to src/main/java/org/kkumulkkum/server/domain/participant/Participant.java index 33d13d6..729c1f0 100644 --- a/src/main/java/org/kkumulkkum/server/domain/Participant.java +++ b/src/main/java/org/kkumulkkum/server/domain/participant/Participant.java @@ -1,10 +1,13 @@ -package org.kkumulkkum.server.domain; +package org.kkumulkkum.server.domain.participant; import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; +import org.kkumulkkum.server.domain.promise.Promise; +import org.kkumulkkum.server.domain.base.BaseTimeEntity; +import org.kkumulkkum.server.domain.member.Member; import java.time.LocalDateTime; diff --git a/src/main/java/org/kkumulkkum/server/service/participant/ParticipantEditor.java b/src/main/java/org/kkumulkkum/server/domain/participant/manager/ParticipantEditor.java similarity index 82% rename from src/main/java/org/kkumulkkum/server/service/participant/ParticipantEditor.java rename to src/main/java/org/kkumulkkum/server/domain/participant/manager/ParticipantEditor.java index caf5a76..6e7de48 100644 --- a/src/main/java/org/kkumulkkum/server/service/participant/ParticipantEditor.java +++ b/src/main/java/org/kkumulkkum/server/domain/participant/manager/ParticipantEditor.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.service.participant; +package org.kkumulkkum.server.domain.participant.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.Participant; -import org.kkumulkkum.server.dto.participant.request.PreparationInfoDto; +import org.kkumulkkum.server.domain.participant.Participant; +import org.kkumulkkum.server.api.participant.dto.request.PreparationInfoDto; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/service/participant/ParticipantRemover.java b/src/main/java/org/kkumulkkum/server/domain/participant/manager/ParticipantRemover.java similarity index 74% rename from src/main/java/org/kkumulkkum/server/service/participant/ParticipantRemover.java rename to src/main/java/org/kkumulkkum/server/domain/participant/manager/ParticipantRemover.java index ada065f..79618e8 100644 --- a/src/main/java/org/kkumulkkum/server/service/participant/ParticipantRemover.java +++ b/src/main/java/org/kkumulkkum/server/domain/participant/manager/ParticipantRemover.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.service.participant; +package org.kkumulkkum.server.domain.participant.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.Participant; -import org.kkumulkkum.server.repository.ParticipantRepository; +import org.kkumulkkum.server.domain.participant.Participant; +import org.kkumulkkum.server.domain.participant.repository.ParticipantRepository; import org.springframework.stereotype.Component; import java.util.List; diff --git a/src/main/java/org/kkumulkkum/server/service/participant/ParticipantRetriever.java b/src/main/java/org/kkumulkkum/server/domain/participant/manager/ParticipantRetriever.java similarity index 81% rename from src/main/java/org/kkumulkkum/server/service/participant/ParticipantRetriever.java rename to src/main/java/org/kkumulkkum/server/domain/participant/manager/ParticipantRetriever.java index 8cf537c..0a5a50c 100644 --- a/src/main/java/org/kkumulkkum/server/service/participant/ParticipantRetriever.java +++ b/src/main/java/org/kkumulkkum/server/domain/participant/manager/ParticipantRetriever.java @@ -1,12 +1,12 @@ -package org.kkumulkkum.server.service.participant; +package org.kkumulkkum.server.domain.participant.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.Participant; -import org.kkumulkkum.server.dto.participant.ParticipantStatusUserInfoDto; -import org.kkumulkkum.server.dto.participant.response.LateComerDto; -import org.kkumulkkum.server.exception.ParticipantException; -import org.kkumulkkum.server.exception.code.ParticipantErrorCode; -import org.kkumulkkum.server.repository.ParticipantRepository; +import org.kkumulkkum.server.domain.participant.Participant; +import org.kkumulkkum.server.api.participant.dto.ParticipantStatusUserInfoDto; +import org.kkumulkkum.server.api.participant.dto.response.LateComerDto; +import org.kkumulkkum.server.common.exception.ParticipantException; +import org.kkumulkkum.server.common.exception.code.ParticipantErrorCode; +import org.kkumulkkum.server.domain.participant.repository.ParticipantRepository; import org.springframework.stereotype.Component; import java.util.List; diff --git a/src/main/java/org/kkumulkkum/server/service/participant/ParticipantSaver.java b/src/main/java/org/kkumulkkum/server/domain/participant/manager/ParticipantSaver.java similarity index 64% rename from src/main/java/org/kkumulkkum/server/service/participant/ParticipantSaver.java rename to src/main/java/org/kkumulkkum/server/domain/participant/manager/ParticipantSaver.java index 8012b6d..924577d 100644 --- a/src/main/java/org/kkumulkkum/server/service/participant/ParticipantSaver.java +++ b/src/main/java/org/kkumulkkum/server/domain/participant/manager/ParticipantSaver.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.service.participant; +package org.kkumulkkum.server.domain.participant.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.Participant; -import org.kkumulkkum.server.repository.ParticipantRepository; +import org.kkumulkkum.server.domain.participant.Participant; +import org.kkumulkkum.server.domain.participant.repository.ParticipantRepository; import org.springframework.stereotype.Component; import java.util.List; diff --git a/src/main/java/org/kkumulkkum/server/repository/ParticipantRepository.java b/src/main/java/org/kkumulkkum/server/domain/participant/repository/ParticipantRepository.java similarity index 86% rename from src/main/java/org/kkumulkkum/server/repository/ParticipantRepository.java rename to src/main/java/org/kkumulkkum/server/domain/participant/repository/ParticipantRepository.java index 82a946e..65ef6f4 100644 --- a/src/main/java/org/kkumulkkum/server/repository/ParticipantRepository.java +++ b/src/main/java/org/kkumulkkum/server/domain/participant/repository/ParticipantRepository.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.repository; +package org.kkumulkkum.server.domain.participant.repository; -import org.kkumulkkum.server.domain.Participant; -import org.kkumulkkum.server.dto.participant.ParticipantStatusUserInfoDto; -import org.kkumulkkum.server.dto.participant.response.LateComerDto; +import org.kkumulkkum.server.domain.participant.Participant; +import org.kkumulkkum.server.api.participant.dto.ParticipantStatusUserInfoDto; +import org.kkumulkkum.server.api.participant.dto.response.LateComerDto; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; @@ -18,7 +18,7 @@ public interface ParticipantRepository extends JpaRepository Optional findByPromiseIdAndUserId(Long promiseId, Long userId); @Query(""" - SELECT new org.kkumulkkum.server.dto.participant.ParticipantStatusUserInfoDto + SELECT new org.kkumulkkum.server.api.participant.dto.ParticipantStatusUserInfoDto (p.id, p.member.id, ui.name, ui.profileImg, p.preparationStartAt, p.departureAt, p.arrivalAt) FROM Participant p JOIN Member m ON p.member.id = m.id @@ -27,7 +27,7 @@ public interface ParticipantRepository extends JpaRepository List findAllByPromiseIdWithUserInfo(Long promiseId); @Query(""" - SELECT new org.kkumulkkum.server.dto.participant.response.LateComerDto + SELECT new org.kkumulkkum.server.api.participant.dto.response.LateComerDto (p.id, ui.name, ui.profileImg) FROM Participant p JOIN Member m ON p.member.id = m.id diff --git a/src/main/java/org/kkumulkkum/server/domain/enums/DressUpLevel.java b/src/main/java/org/kkumulkkum/server/domain/promise/DressUpLevel.java similarity index 86% rename from src/main/java/org/kkumulkkum/server/domain/enums/DressUpLevel.java rename to src/main/java/org/kkumulkkum/server/domain/promise/DressUpLevel.java index e67b92f..6630a22 100644 --- a/src/main/java/org/kkumulkkum/server/domain/enums/DressUpLevel.java +++ b/src/main/java/org/kkumulkkum/server/domain/promise/DressUpLevel.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.domain.enums; +package org.kkumulkkum.server.domain.promise; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/kkumulkkum/server/domain/Promise.java b/src/main/java/org/kkumulkkum/server/domain/promise/Promise.java similarity index 93% rename from src/main/java/org/kkumulkkum/server/domain/Promise.java rename to src/main/java/org/kkumulkkum/server/domain/promise/Promise.java index 26c14e9..7d5bd8b 100644 --- a/src/main/java/org/kkumulkkum/server/domain/Promise.java +++ b/src/main/java/org/kkumulkkum/server/domain/promise/Promise.java @@ -1,11 +1,12 @@ -package org.kkumulkkum.server.domain; +package org.kkumulkkum.server.domain.promise; import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import org.kkumulkkum.server.domain.enums.DressUpLevel; +import org.kkumulkkum.server.domain.base.BaseTimeEntity; +import org.kkumulkkum.server.domain.meeting.Meeting; import java.time.LocalDateTime; diff --git a/src/main/java/org/kkumulkkum/server/service/promise/PromiseEditor.java b/src/main/java/org/kkumulkkum/server/domain/promise/manager/PromiseEditor.java similarity index 80% rename from src/main/java/org/kkumulkkum/server/service/promise/PromiseEditor.java rename to src/main/java/org/kkumulkkum/server/domain/promise/manager/PromiseEditor.java index 9aeb583..1c0c271 100644 --- a/src/main/java/org/kkumulkkum/server/service/promise/PromiseEditor.java +++ b/src/main/java/org/kkumulkkum/server/domain/promise/manager/PromiseEditor.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.service.promise; +package org.kkumulkkum.server.domain.promise.manager; -import org.kkumulkkum.server.domain.Promise; -import org.kkumulkkum.server.dto.promise.PromiseCreateDto; +import org.kkumulkkum.server.domain.promise.Promise; +import org.kkumulkkum.server.api.promise.dto.request.PromiseCreateDto; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/service/promise/PromiseRemover.java b/src/main/java/org/kkumulkkum/server/domain/promise/manager/PromiseRemover.java similarity index 77% rename from src/main/java/org/kkumulkkum/server/service/promise/PromiseRemover.java rename to src/main/java/org/kkumulkkum/server/domain/promise/manager/PromiseRemover.java index 60a1b62..adda6c8 100644 --- a/src/main/java/org/kkumulkkum/server/service/promise/PromiseRemover.java +++ b/src/main/java/org/kkumulkkum/server/domain/promise/manager/PromiseRemover.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.service.promise; +package org.kkumulkkum.server.domain.promise.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.repository.PromiseRepository; +import org.kkumulkkum.server.domain.promise.repository.PromiseRepository; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/service/promise/PromiseRetriever.java b/src/main/java/org/kkumulkkum/server/domain/promise/manager/PromiseRetriever.java similarity index 88% rename from src/main/java/org/kkumulkkum/server/service/promise/PromiseRetriever.java rename to src/main/java/org/kkumulkkum/server/domain/promise/manager/PromiseRetriever.java index 5447609..eda34c2 100644 --- a/src/main/java/org/kkumulkkum/server/service/promise/PromiseRetriever.java +++ b/src/main/java/org/kkumulkkum/server/domain/promise/manager/PromiseRetriever.java @@ -1,10 +1,10 @@ -package org.kkumulkkum.server.service.promise; +package org.kkumulkkum.server.domain.promise.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.Promise; -import org.kkumulkkum.server.exception.PromiseException; -import org.kkumulkkum.server.exception.code.PromiseErrorCode; -import org.kkumulkkum.server.repository.PromiseRepository; +import org.kkumulkkum.server.domain.promise.Promise; +import org.kkumulkkum.server.common.exception.PromiseException; +import org.kkumulkkum.server.common.exception.code.PromiseErrorCode; +import org.kkumulkkum.server.domain.promise.repository.PromiseRepository; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.stereotype.Component; diff --git a/src/main/java/org/kkumulkkum/server/service/promise/PromiseSaver.java b/src/main/java/org/kkumulkkum/server/domain/promise/manager/PromiseSaver.java similarity index 62% rename from src/main/java/org/kkumulkkum/server/service/promise/PromiseSaver.java rename to src/main/java/org/kkumulkkum/server/domain/promise/manager/PromiseSaver.java index 81cfc01..9089e9f 100644 --- a/src/main/java/org/kkumulkkum/server/service/promise/PromiseSaver.java +++ b/src/main/java/org/kkumulkkum/server/domain/promise/manager/PromiseSaver.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.service.promise; +package org.kkumulkkum.server.domain.promise.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.Promise; -import org.kkumulkkum.server.repository.PromiseRepository; +import org.kkumulkkum.server.domain.promise.Promise; +import org.kkumulkkum.server.domain.promise.repository.PromiseRepository; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/repository/PromiseRepository.java b/src/main/java/org/kkumulkkum/server/domain/promise/repository/PromiseRepository.java similarity index 95% rename from src/main/java/org/kkumulkkum/server/repository/PromiseRepository.java rename to src/main/java/org/kkumulkkum/server/domain/promise/repository/PromiseRepository.java index b35aab8..b2e261b 100644 --- a/src/main/java/org/kkumulkkum/server/repository/PromiseRepository.java +++ b/src/main/java/org/kkumulkkum/server/domain/promise/repository/PromiseRepository.java @@ -1,6 +1,6 @@ -package org.kkumulkkum.server.repository; +package org.kkumulkkum.server.domain.promise.repository; -import org.kkumulkkum.server.domain.Promise; +import org.kkumulkkum.server.domain.promise.Promise; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; diff --git a/src/main/java/org/kkumulkkum/server/domain/enums/Provider.java b/src/main/java/org/kkumulkkum/server/domain/user/Provider.java similarity index 51% rename from src/main/java/org/kkumulkkum/server/domain/enums/Provider.java rename to src/main/java/org/kkumulkkum/server/domain/user/Provider.java index b5772fa..272e578 100644 --- a/src/main/java/org/kkumulkkum/server/domain/enums/Provider.java +++ b/src/main/java/org/kkumulkkum/server/domain/user/Provider.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.domain.enums; +package org.kkumulkkum.server.domain.user; public enum Provider { KAKAO, diff --git a/src/main/java/org/kkumulkkum/server/domain/user/Role.java b/src/main/java/org/kkumulkkum/server/domain/user/Role.java new file mode 100644 index 0000000..ff9d778 --- /dev/null +++ b/src/main/java/org/kkumulkkum/server/domain/user/Role.java @@ -0,0 +1,6 @@ +package org.kkumulkkum.server.domain.user; + +public enum Role { + USER, + ADMIN +} diff --git a/src/main/java/org/kkumulkkum/server/domain/Token.java b/src/main/java/org/kkumulkkum/server/domain/user/Token.java similarity index 93% rename from src/main/java/org/kkumulkkum/server/domain/Token.java rename to src/main/java/org/kkumulkkum/server/domain/user/Token.java index f88bfcb..bec5820 100644 --- a/src/main/java/org/kkumulkkum/server/domain/Token.java +++ b/src/main/java/org/kkumulkkum/server/domain/user/Token.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.domain; +package org.kkumulkkum.server.domain.user; import lombok.AccessLevel; import lombok.Builder; diff --git a/src/main/java/org/kkumulkkum/server/domain/User.java b/src/main/java/org/kkumulkkum/server/domain/user/User.java similarity index 85% rename from src/main/java/org/kkumulkkum/server/domain/User.java rename to src/main/java/org/kkumulkkum/server/domain/user/User.java index f1d5358..1d492e0 100644 --- a/src/main/java/org/kkumulkkum/server/domain/User.java +++ b/src/main/java/org/kkumulkkum/server/domain/user/User.java @@ -1,12 +1,11 @@ -package org.kkumulkkum.server.domain; +package org.kkumulkkum.server.domain.user; import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import org.kkumulkkum.server.domain.enums.Provider; -import org.kkumulkkum.server.domain.enums.Role; +import org.kkumulkkum.server.domain.base.BaseTimeEntity; @Entity @Getter diff --git a/src/main/java/org/kkumulkkum/server/service/auth/TokenRemover.java b/src/main/java/org/kkumulkkum/server/domain/user/manager/TokenRemover.java similarity index 71% rename from src/main/java/org/kkumulkkum/server/service/auth/TokenRemover.java rename to src/main/java/org/kkumulkkum/server/domain/user/manager/TokenRemover.java index b092068..976a1cc 100644 --- a/src/main/java/org/kkumulkkum/server/service/auth/TokenRemover.java +++ b/src/main/java/org/kkumulkkum/server/domain/user/manager/TokenRemover.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.service.auth; +package org.kkumulkkum.server.domain.user.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.repository.TokenRepository; +import org.kkumulkkum.server.domain.user.repository.TokenRepository; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/service/auth/TokenRetriever.java b/src/main/java/org/kkumulkkum/server/domain/user/manager/TokenRetriever.java similarity index 59% rename from src/main/java/org/kkumulkkum/server/service/auth/TokenRetriever.java rename to src/main/java/org/kkumulkkum/server/domain/user/manager/TokenRetriever.java index 220cb57..e5dbd84 100644 --- a/src/main/java/org/kkumulkkum/server/service/auth/TokenRetriever.java +++ b/src/main/java/org/kkumulkkum/server/domain/user/manager/TokenRetriever.java @@ -1,10 +1,10 @@ -package org.kkumulkkum.server.service.auth; +package org.kkumulkkum.server.domain.user.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.Token; -import org.kkumulkkum.server.exception.AuthException; -import org.kkumulkkum.server.exception.code.AuthErrorCode; -import org.kkumulkkum.server.repository.TokenRepository; +import org.kkumulkkum.server.domain.user.Token; +import org.kkumulkkum.server.common.exception.AuthException; +import org.kkumulkkum.server.common.exception.code.AuthErrorCode; +import org.kkumulkkum.server.domain.user.repository.TokenRepository; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/service/auth/TokenSaver.java b/src/main/java/org/kkumulkkum/server/domain/user/manager/TokenSaver.java similarity index 63% rename from src/main/java/org/kkumulkkum/server/service/auth/TokenSaver.java rename to src/main/java/org/kkumulkkum/server/domain/user/manager/TokenSaver.java index 3f125b4..0111c2c 100644 --- a/src/main/java/org/kkumulkkum/server/service/auth/TokenSaver.java +++ b/src/main/java/org/kkumulkkum/server/domain/user/manager/TokenSaver.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.service.auth; +package org.kkumulkkum.server.domain.user.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.Token; -import org.kkumulkkum.server.repository.TokenRepository; +import org.kkumulkkum.server.domain.user.Token; +import org.kkumulkkum.server.domain.user.repository.TokenRepository; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/service/user/UserRemover.java b/src/main/java/org/kkumulkkum/server/domain/user/manager/UserRemover.java similarity index 57% rename from src/main/java/org/kkumulkkum/server/service/user/UserRemover.java rename to src/main/java/org/kkumulkkum/server/domain/user/manager/UserRemover.java index d047b7a..7fc308c 100644 --- a/src/main/java/org/kkumulkkum/server/service/user/UserRemover.java +++ b/src/main/java/org/kkumulkkum/server/domain/user/manager/UserRemover.java @@ -1,9 +1,8 @@ -package org.kkumulkkum.server.service.user; +package org.kkumulkkum.server.domain.user.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.User; -import org.kkumulkkum.server.repository.UserRepository; -import org.kkumulkkum.server.service.userInfo.UserInfoRetriever; +import org.kkumulkkum.server.domain.user.User; +import org.kkumulkkum.server.domain.user.repository.UserRepository; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/service/user/UserRetriever.java b/src/main/java/org/kkumulkkum/server/domain/user/manager/UserRetriever.java similarity index 72% rename from src/main/java/org/kkumulkkum/server/service/user/UserRetriever.java rename to src/main/java/org/kkumulkkum/server/domain/user/manager/UserRetriever.java index 0c61c0a..973f922 100644 --- a/src/main/java/org/kkumulkkum/server/service/user/UserRetriever.java +++ b/src/main/java/org/kkumulkkum/server/domain/user/manager/UserRetriever.java @@ -1,11 +1,11 @@ -package org.kkumulkkum.server.service.user; +package org.kkumulkkum.server.domain.user.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.User; -import org.kkumulkkum.server.domain.enums.Provider; -import org.kkumulkkum.server.exception.UserException; -import org.kkumulkkum.server.exception.code.UserErrorCode; -import org.kkumulkkum.server.repository.UserRepository; +import org.kkumulkkum.server.domain.user.User; +import org.kkumulkkum.server.domain.user.Provider; +import org.kkumulkkum.server.common.exception.UserException; +import org.kkumulkkum.server.common.exception.code.UserErrorCode; +import org.kkumulkkum.server.domain.user.repository.UserRepository; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/service/user/UserSaver.java b/src/main/java/org/kkumulkkum/server/domain/user/manager/UserSaver.java similarity index 63% rename from src/main/java/org/kkumulkkum/server/service/user/UserSaver.java rename to src/main/java/org/kkumulkkum/server/domain/user/manager/UserSaver.java index 27e8f71..2c04b87 100644 --- a/src/main/java/org/kkumulkkum/server/service/user/UserSaver.java +++ b/src/main/java/org/kkumulkkum/server/domain/user/manager/UserSaver.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.service.user; +package org.kkumulkkum.server.domain.user.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.User; -import org.kkumulkkum.server.repository.UserRepository; +import org.kkumulkkum.server.domain.user.User; +import org.kkumulkkum.server.domain.user.repository.UserRepository; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/repository/TokenRepository.java b/src/main/java/org/kkumulkkum/server/domain/user/repository/TokenRepository.java similarity index 68% rename from src/main/java/org/kkumulkkum/server/repository/TokenRepository.java rename to src/main/java/org/kkumulkkum/server/domain/user/repository/TokenRepository.java index 64da715..10dadbf 100644 --- a/src/main/java/org/kkumulkkum/server/repository/TokenRepository.java +++ b/src/main/java/org/kkumulkkum/server/domain/user/repository/TokenRepository.java @@ -1,6 +1,6 @@ -package org.kkumulkkum.server.repository; +package org.kkumulkkum.server.domain.user.repository; -import org.kkumulkkum.server.domain.Token; +import org.kkumulkkum.server.domain.user.Token; import org.springframework.data.repository.CrudRepository; import java.util.Optional; diff --git a/src/main/java/org/kkumulkkum/server/repository/UserRepository.java b/src/main/java/org/kkumulkkum/server/domain/user/repository/UserRepository.java similarity index 68% rename from src/main/java/org/kkumulkkum/server/repository/UserRepository.java rename to src/main/java/org/kkumulkkum/server/domain/user/repository/UserRepository.java index aeb6867..4fe8767 100644 --- a/src/main/java/org/kkumulkkum/server/repository/UserRepository.java +++ b/src/main/java/org/kkumulkkum/server/domain/user/repository/UserRepository.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.repository; +package org.kkumulkkum.server.domain.user.repository; -import org.kkumulkkum.server.domain.User; -import org.kkumulkkum.server.domain.enums.Provider; +import org.kkumulkkum.server.domain.user.User; +import org.kkumulkkum.server.domain.user.Provider; import org.springframework.data.jpa.repository.JpaRepository; import java.util.Optional; diff --git a/src/main/java/org/kkumulkkum/server/domain/UserInfo.java b/src/main/java/org/kkumulkkum/server/domain/userinfo/UserInfo.java similarity index 92% rename from src/main/java/org/kkumulkkum/server/domain/UserInfo.java rename to src/main/java/org/kkumulkkum/server/domain/userinfo/UserInfo.java index d2ba684..ae57b9d 100644 --- a/src/main/java/org/kkumulkkum/server/domain/UserInfo.java +++ b/src/main/java/org/kkumulkkum/server/domain/userinfo/UserInfo.java @@ -1,10 +1,12 @@ -package org.kkumulkkum.server.domain; +package org.kkumulkkum.server.domain.userinfo; import jakarta.persistence.*; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; +import org.kkumulkkum.server.domain.base.BaseTimeEntity; +import org.kkumulkkum.server.domain.user.User; @Entity @Getter diff --git a/src/main/java/org/kkumulkkum/server/service/userInfo/UserInfoEditor.java b/src/main/java/org/kkumulkkum/server/domain/userinfo/manager/UserInfoEditor.java similarity index 81% rename from src/main/java/org/kkumulkkum/server/service/userInfo/UserInfoEditor.java rename to src/main/java/org/kkumulkkum/server/domain/userinfo/manager/UserInfoEditor.java index 225c832..ccbbbda 100644 --- a/src/main/java/org/kkumulkkum/server/service/userInfo/UserInfoEditor.java +++ b/src/main/java/org/kkumulkkum/server/domain/userinfo/manager/UserInfoEditor.java @@ -1,6 +1,6 @@ -package org.kkumulkkum.server.service.userInfo; +package org.kkumulkkum.server.domain.userinfo.manager; -import org.kkumulkkum.server.domain.UserInfo; +import org.kkumulkkum.server.domain.userinfo.UserInfo; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/service/userInfo/UserInfoRemover.java b/src/main/java/org/kkumulkkum/server/domain/userinfo/manager/UserInfoRemover.java similarity index 71% rename from src/main/java/org/kkumulkkum/server/service/userInfo/UserInfoRemover.java rename to src/main/java/org/kkumulkkum/server/domain/userinfo/manager/UserInfoRemover.java index 2b8d428..2b2a75f 100644 --- a/src/main/java/org/kkumulkkum/server/service/userInfo/UserInfoRemover.java +++ b/src/main/java/org/kkumulkkum/server/domain/userinfo/manager/UserInfoRemover.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.service.userInfo; +package org.kkumulkkum.server.domain.userinfo.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.repository.UserInfoRepository; +import org.kkumulkkum.server.domain.userinfo.repository.UserInfoRepository; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/service/userInfo/UserInfoRetriever.java b/src/main/java/org/kkumulkkum/server/domain/userinfo/manager/UserInfoRetriever.java similarity index 67% rename from src/main/java/org/kkumulkkum/server/service/userInfo/UserInfoRetriever.java rename to src/main/java/org/kkumulkkum/server/domain/userinfo/manager/UserInfoRetriever.java index 982e344..2f81284 100644 --- a/src/main/java/org/kkumulkkum/server/service/userInfo/UserInfoRetriever.java +++ b/src/main/java/org/kkumulkkum/server/domain/userinfo/manager/UserInfoRetriever.java @@ -1,10 +1,10 @@ -package org.kkumulkkum.server.service.userInfo; +package org.kkumulkkum.server.domain.userinfo.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.UserInfo; -import org.kkumulkkum.server.exception.UserException; -import org.kkumulkkum.server.exception.code.UserErrorCode; -import org.kkumulkkum.server.repository.UserInfoRepository; +import org.kkumulkkum.server.domain.userinfo.UserInfo; +import org.kkumulkkum.server.common.exception.UserException; +import org.kkumulkkum.server.common.exception.code.UserErrorCode; +import org.kkumulkkum.server.domain.userinfo.repository.UserInfoRepository; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/service/userInfo/UserInfoSaver.java b/src/main/java/org/kkumulkkum/server/domain/userinfo/manager/UserInfoSaver.java similarity index 62% rename from src/main/java/org/kkumulkkum/server/service/userInfo/UserInfoSaver.java rename to src/main/java/org/kkumulkkum/server/domain/userinfo/manager/UserInfoSaver.java index 771b5c0..10e1eb1 100644 --- a/src/main/java/org/kkumulkkum/server/service/userInfo/UserInfoSaver.java +++ b/src/main/java/org/kkumulkkum/server/domain/userinfo/manager/UserInfoSaver.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.service.userInfo; +package org.kkumulkkum.server.domain.userinfo.manager; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.domain.UserInfo; -import org.kkumulkkum.server.repository.UserInfoRepository; +import org.kkumulkkum.server.domain.userinfo.UserInfo; +import org.kkumulkkum.server.domain.userinfo.repository.UserInfoRepository; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/org/kkumulkkum/server/repository/UserInfoRepository.java b/src/main/java/org/kkumulkkum/server/domain/userinfo/repository/UserInfoRepository.java similarity index 82% rename from src/main/java/org/kkumulkkum/server/repository/UserInfoRepository.java rename to src/main/java/org/kkumulkkum/server/domain/userinfo/repository/UserInfoRepository.java index b87e26f..9fd6bd3 100644 --- a/src/main/java/org/kkumulkkum/server/repository/UserInfoRepository.java +++ b/src/main/java/org/kkumulkkum/server/domain/userinfo/repository/UserInfoRepository.java @@ -1,6 +1,6 @@ -package org.kkumulkkum.server.repository; +package org.kkumulkkum.server.domain.userinfo.repository; -import org.kkumulkkum.server.domain.UserInfo; +import org.kkumulkkum.server.domain.userinfo.UserInfo; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; diff --git a/src/main/java/org/kkumulkkum/server/dto/meeting/MeetingMetCountDto.java b/src/main/java/org/kkumulkkum/server/dto/meeting/MeetingMetCountDto.java deleted file mode 100644 index 72281fa..0000000 --- a/src/main/java/org/kkumulkkum/server/dto/meeting/MeetingMetCountDto.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.kkumulkkum.server.dto.meeting; - -import org.kkumulkkum.server.domain.Meeting; - -public record MeetingMetCountDto ( - Meeting meeting, - Long metCount -) { -} diff --git a/src/main/java/org/kkumulkkum/server/dto/test/TestDto.java b/src/main/java/org/kkumulkkum/server/dto/test/TestDto.java deleted file mode 100644 index b7825f9..0000000 --- a/src/main/java/org/kkumulkkum/server/dto/test/TestDto.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.kkumulkkum.server.dto.test; - -public record TestDto( - String test -) { - public static TestDto from(String test) { - return new TestDto(test); - } -} diff --git a/src/main/java/org/kkumulkkum/server/config/AwsConfig.java b/src/main/java/org/kkumulkkum/server/external/config/AwsConfig.java similarity index 97% rename from src/main/java/org/kkumulkkum/server/config/AwsConfig.java rename to src/main/java/org/kkumulkkum/server/external/config/AwsConfig.java index 49817dd..9fe3b2c 100644 --- a/src/main/java/org/kkumulkkum/server/config/AwsConfig.java +++ b/src/main/java/org/kkumulkkum/server/external/config/AwsConfig.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.config; +package org.kkumulkkum.server.external.config; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; diff --git a/src/main/java/org/kkumulkkum/server/config/FeignClientConfig.java b/src/main/java/org/kkumulkkum/server/external/config/FeignClientConfig.java similarity index 86% rename from src/main/java/org/kkumulkkum/server/config/FeignClientConfig.java rename to src/main/java/org/kkumulkkum/server/external/config/FeignClientConfig.java index 1182b92..395efc4 100644 --- a/src/main/java/org/kkumulkkum/server/config/FeignClientConfig.java +++ b/src/main/java/org/kkumulkkum/server/external/config/FeignClientConfig.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.config; +package org.kkumulkkum.server.external.config; import org.kkumulkkum.server.ServerApplication; import org.springframework.cloud.openfeign.EnableFeignClients; diff --git a/src/main/java/org/kkumulkkum/server/config/FirebaseConfig.java b/src/main/java/org/kkumulkkum/server/external/config/FirebaseConfig.java similarity index 86% rename from src/main/java/org/kkumulkkum/server/config/FirebaseConfig.java rename to src/main/java/org/kkumulkkum/server/external/config/FirebaseConfig.java index 1da0082..a36c9fe 100644 --- a/src/main/java/org/kkumulkkum/server/config/FirebaseConfig.java +++ b/src/main/java/org/kkumulkkum/server/external/config/FirebaseConfig.java @@ -1,12 +1,12 @@ -package org.kkumulkkum.server.config; +package org.kkumulkkum.server.external.config; import com.google.auth.oauth2.GoogleCredentials; import com.google.firebase.FirebaseApp; import com.google.firebase.FirebaseOptions; import jakarta.annotation.PostConstruct; import lombok.extern.slf4j.Slf4j; -import org.kkumulkkum.server.exception.FirebaseException; -import org.kkumulkkum.server.exception.code.FirebaseErrorCode; +import org.kkumulkkum.server.common.exception.FirebaseException; +import org.kkumulkkum.server.common.exception.code.FirebaseErrorCode; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.ClassPathResource; diff --git a/src/main/java/org/kkumulkkum/server/controller/LocationController.java b/src/main/java/org/kkumulkkum/server/external/controller/naver/NaverLocationController.java similarity index 71% rename from src/main/java/org/kkumulkkum/server/controller/LocationController.java rename to src/main/java/org/kkumulkkum/server/external/controller/naver/NaverLocationController.java index 43f9b78..5b365fb 100644 --- a/src/main/java/org/kkumulkkum/server/controller/LocationController.java +++ b/src/main/java/org/kkumulkkum/server/external/controller/naver/NaverLocationController.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.controller; +package org.kkumulkkum.server.external.controller.naver; import lombok.RequiredArgsConstructor; -import org.kkumulkkum.server.external.NaverService; -import org.kkumulkkum.server.external.dto.LocationsDto; +import org.kkumulkkum.server.external.service.naver.NaverService; +import org.kkumulkkum.server.external.controller.naver.dto.LocationsDto; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -10,7 +10,7 @@ @RestController @RequiredArgsConstructor -public class LocationController { +public class NaverLocationController { private final NaverService naverService; diff --git a/src/main/java/org/kkumulkkum/server/external/dto/LocationDto.java b/src/main/java/org/kkumulkkum/server/external/controller/naver/dto/LocationDto.java similarity index 70% rename from src/main/java/org/kkumulkkum/server/external/dto/LocationDto.java rename to src/main/java/org/kkumulkkum/server/external/controller/naver/dto/LocationDto.java index 061f475..7658275 100644 --- a/src/main/java/org/kkumulkkum/server/external/dto/LocationDto.java +++ b/src/main/java/org/kkumulkkum/server/external/controller/naver/dto/LocationDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.external.dto; +package org.kkumulkkum.server.external.controller.naver.dto; public record LocationDto( diff --git a/src/main/java/org/kkumulkkum/server/external/dto/LocationsDto.java b/src/main/java/org/kkumulkkum/server/external/controller/naver/dto/LocationsDto.java similarity index 78% rename from src/main/java/org/kkumulkkum/server/external/dto/LocationsDto.java rename to src/main/java/org/kkumulkkum/server/external/controller/naver/dto/LocationsDto.java index b62044b..c3d8567 100644 --- a/src/main/java/org/kkumulkkum/server/external/dto/LocationsDto.java +++ b/src/main/java/org/kkumulkkum/server/external/controller/naver/dto/LocationsDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.external.dto; +package org.kkumulkkum.server.external.controller.naver.dto; import java.util.List; diff --git a/src/main/java/org/kkumulkkum/server/auth/openfeign/apple/AppleFeignClient.java b/src/main/java/org/kkumulkkum/server/external/service/apple/AppleFeignClient.java similarity index 86% rename from src/main/java/org/kkumulkkum/server/auth/openfeign/apple/AppleFeignClient.java rename to src/main/java/org/kkumulkkum/server/external/service/apple/AppleFeignClient.java index e5f162e..cb46138 100644 --- a/src/main/java/org/kkumulkkum/server/auth/openfeign/apple/AppleFeignClient.java +++ b/src/main/java/org/kkumulkkum/server/external/service/apple/AppleFeignClient.java @@ -1,7 +1,7 @@ -package org.kkumulkkum.server.auth.openfeign.apple; +package org.kkumulkkum.server.external.service.apple; -import org.kkumulkkum.server.auth.openfeign.apple.dto.ApplePublicKeys; -import org.kkumulkkum.server.auth.openfeign.apple.dto.AppleTokenDto; +import org.kkumulkkum.server.api.auth.dto.verify.ApplePublicKeys; +import org.kkumulkkum.server.external.service.apple.dto.AppleTokenDto; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.GetMapping; diff --git a/src/main/java/org/kkumulkkum/server/auth/openfeign/apple/dto/AppleTokenDto.java b/src/main/java/org/kkumulkkum/server/external/service/apple/dto/AppleTokenDto.java similarity index 85% rename from src/main/java/org/kkumulkkum/server/auth/openfeign/apple/dto/AppleTokenDto.java rename to src/main/java/org/kkumulkkum/server/external/service/apple/dto/AppleTokenDto.java index 627e0e2..85caabb 100644 --- a/src/main/java/org/kkumulkkum/server/auth/openfeign/apple/dto/AppleTokenDto.java +++ b/src/main/java/org/kkumulkkum/server/external/service/apple/dto/AppleTokenDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.auth.openfeign.apple.dto; +package org.kkumulkkum.server.external.service.apple.dto; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; diff --git a/src/main/java/org/kkumulkkum/server/external/enums/FcmContent.java b/src/main/java/org/kkumulkkum/server/external/service/fcm/FcmContent.java similarity index 93% rename from src/main/java/org/kkumulkkum/server/external/enums/FcmContent.java rename to src/main/java/org/kkumulkkum/server/external/service/fcm/FcmContent.java index a79ffb9..64abf05 100644 --- a/src/main/java/org/kkumulkkum/server/external/enums/FcmContent.java +++ b/src/main/java/org/kkumulkkum/server/external/service/fcm/FcmContent.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.external.enums; +package org.kkumulkkum.server.external.service.fcm; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/org/kkumulkkum/server/external/FcmService.java b/src/main/java/org/kkumulkkum/server/external/service/fcm/FcmService.java similarity index 85% rename from src/main/java/org/kkumulkkum/server/external/FcmService.java rename to src/main/java/org/kkumulkkum/server/external/service/fcm/FcmService.java index 2582b2d..f5e386c 100644 --- a/src/main/java/org/kkumulkkum/server/external/FcmService.java +++ b/src/main/java/org/kkumulkkum/server/external/service/fcm/FcmService.java @@ -1,11 +1,11 @@ -package org.kkumulkkum.server.external; +package org.kkumulkkum.server.external.service.fcm; import com.google.firebase.messaging.*; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.kkumulkkum.server.exception.FirebaseException; -import org.kkumulkkum.server.exception.code.FirebaseErrorCode; -import org.kkumulkkum.server.external.dto.FcmMessageDto; +import org.kkumulkkum.server.common.exception.FirebaseException; +import org.kkumulkkum.server.common.exception.code.FirebaseErrorCode; +import org.kkumulkkum.server.external.service.fcm.dto.FcmMessageDto; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; diff --git a/src/main/java/org/kkumulkkum/server/external/dto/FcmMessageDto.java b/src/main/java/org/kkumulkkum/server/external/service/fcm/dto/FcmMessageDto.java similarity index 77% rename from src/main/java/org/kkumulkkum/server/external/dto/FcmMessageDto.java rename to src/main/java/org/kkumulkkum/server/external/service/fcm/dto/FcmMessageDto.java index 9e3fe21..bd28188 100644 --- a/src/main/java/org/kkumulkkum/server/external/dto/FcmMessageDto.java +++ b/src/main/java/org/kkumulkkum/server/external/service/fcm/dto/FcmMessageDto.java @@ -1,6 +1,6 @@ -package org.kkumulkkum.server.external.dto; +package org.kkumulkkum.server.external.service.fcm.dto; -import org.kkumulkkum.server.external.enums.FcmContent; +import org.kkumulkkum.server.external.service.fcm.FcmContent; public record FcmMessageDto( String title, diff --git a/src/main/java/org/kkumulkkum/server/auth/openfeign/kakao/KakaoFeignClient.java b/src/main/java/org/kkumulkkum/server/external/service/kakao/KakaoFeignClient.java similarity index 87% rename from src/main/java/org/kkumulkkum/server/auth/openfeign/kakao/KakaoFeignClient.java rename to src/main/java/org/kkumulkkum/server/external/service/kakao/KakaoFeignClient.java index 85c1bd8..a45765d 100644 --- a/src/main/java/org/kkumulkkum/server/auth/openfeign/kakao/KakaoFeignClient.java +++ b/src/main/java/org/kkumulkkum/server/external/service/kakao/KakaoFeignClient.java @@ -1,6 +1,6 @@ -package org.kkumulkkum.server.auth.openfeign.kakao; +package org.kkumulkkum.server.external.service.kakao; -import org.kkumulkkum.server.auth.openfeign.kakao.dto.KakaoUserDto; +import org.kkumulkkum.server.external.service.kakao.dto.KakaoUserDto; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.http.HttpHeaders; import org.springframework.web.bind.annotation.GetMapping; diff --git a/src/main/java/org/kkumulkkum/server/external/service/kakao/dto/KakaoAccount.java b/src/main/java/org/kkumulkkum/server/external/service/kakao/dto/KakaoAccount.java new file mode 100644 index 0000000..6dd9da7 --- /dev/null +++ b/src/main/java/org/kkumulkkum/server/external/service/kakao/dto/KakaoAccount.java @@ -0,0 +1,6 @@ +package org.kkumulkkum.server.external.service.kakao.dto; + +public record KakaoAccount( + String email +) { +} diff --git a/src/main/java/org/kkumulkkum/server/auth/openfeign/kakao/dto/KakaoUserDto.java b/src/main/java/org/kkumulkkum/server/external/service/kakao/dto/KakaoUserDto.java similarity index 82% rename from src/main/java/org/kkumulkkum/server/auth/openfeign/kakao/dto/KakaoUserDto.java rename to src/main/java/org/kkumulkkum/server/external/service/kakao/dto/KakaoUserDto.java index 7ee0dff..a2aa318 100644 --- a/src/main/java/org/kkumulkkum/server/auth/openfeign/kakao/dto/KakaoUserDto.java +++ b/src/main/java/org/kkumulkkum/server/external/service/kakao/dto/KakaoUserDto.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.auth.openfeign.kakao.dto; +package org.kkumulkkum.server.external.service.kakao.dto; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; diff --git a/src/main/java/org/kkumulkkum/server/external/NaverService.java b/src/main/java/org/kkumulkkum/server/external/service/naver/NaverService.java similarity index 90% rename from src/main/java/org/kkumulkkum/server/external/NaverService.java rename to src/main/java/org/kkumulkkum/server/external/service/naver/NaverService.java index 61d6efc..a846fa2 100644 --- a/src/main/java/org/kkumulkkum/server/external/NaverService.java +++ b/src/main/java/org/kkumulkkum/server/external/service/naver/NaverService.java @@ -1,10 +1,10 @@ -package org.kkumulkkum.server.external; +package org.kkumulkkum.server.external.service.naver; -import org.kkumulkkum.server.exception.OpenApiException; -import org.kkumulkkum.server.exception.code.OpenApiErrorCode; -import org.kkumulkkum.server.external.dto.LocationDto; -import org.kkumulkkum.server.external.dto.LocationsDto; -import org.kkumulkkum.server.external.dto.NaverLocationResponse; +import org.kkumulkkum.server.common.exception.OpenApiException; +import org.kkumulkkum.server.common.exception.code.OpenApiErrorCode; +import org.kkumulkkum.server.external.controller.naver.dto.LocationDto; +import org.kkumulkkum.server.external.controller.naver.dto.LocationsDto; +import org.kkumulkkum.server.external.service.naver.dto.NaverLocationResponse; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpStatusCode; import org.springframework.stereotype.Service; diff --git a/src/main/java/org/kkumulkkum/server/external/dto/NaverLocationResponse.java b/src/main/java/org/kkumulkkum/server/external/service/naver/dto/NaverLocationResponse.java similarity index 89% rename from src/main/java/org/kkumulkkum/server/external/dto/NaverLocationResponse.java rename to src/main/java/org/kkumulkkum/server/external/service/naver/dto/NaverLocationResponse.java index 840f716..8eda910 100644 --- a/src/main/java/org/kkumulkkum/server/external/dto/NaverLocationResponse.java +++ b/src/main/java/org/kkumulkkum/server/external/service/naver/dto/NaverLocationResponse.java @@ -1,4 +1,4 @@ -package org.kkumulkkum.server.external.dto; +package org.kkumulkkum.server.external.service.naver.dto; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/src/main/java/org/kkumulkkum/server/external/S3Service.java b/src/main/java/org/kkumulkkum/server/external/service/s3/S3Service.java similarity index 93% rename from src/main/java/org/kkumulkkum/server/external/S3Service.java rename to src/main/java/org/kkumulkkum/server/external/service/s3/S3Service.java index 66e9b79..ee5a3dd 100644 --- a/src/main/java/org/kkumulkkum/server/external/S3Service.java +++ b/src/main/java/org/kkumulkkum/server/external/service/s3/S3Service.java @@ -1,8 +1,8 @@ -package org.kkumulkkum.server.external; +package org.kkumulkkum.server.external.service.s3; -import org.kkumulkkum.server.config.AwsConfig; -import org.kkumulkkum.server.exception.AwsException; -import org.kkumulkkum.server.exception.code.AwsErrorCode; +import org.kkumulkkum.server.external.config.AwsConfig; +import org.kkumulkkum.server.common.exception.AwsException; +import org.kkumulkkum.server.common.exception.code.AwsErrorCode; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import org.springframework.web.multipart.MultipartFile; diff --git a/src/main/resources/discord-appender.xml b/src/main/resources/discord-appender.xml index b95e152..525fd89 100644 --- a/src/main/resources/discord-appender.xml +++ b/src/main/resources/discord-appender.xml @@ -1,5 +1,5 @@ - + ${DISCORD_WEBHOOK_URI} 개 큰 에러 나는 꾸물꿈 https://github.com/user-attachments/assets/452211e9-0c88-41e9-a49c-42c3b099a197