diff --git a/src/main/java/com/somemore/auth/jwt/generator/JwtGenerator.java b/src/main/java/com/somemore/auth/jwt/generator/JwtGenerator.java deleted file mode 100644 index 878721dee..000000000 --- a/src/main/java/com/somemore/auth/jwt/generator/JwtGenerator.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.somemore.auth.jwt.generator; - -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.domain.TokenType; - -public interface JwtGenerator { - EncodedToken generateToken(String userId, String role, TokenType tokenType); -} diff --git a/src/main/java/com/somemore/auth/jwt/refresh/refresher/JwtRefresher.java b/src/main/java/com/somemore/auth/jwt/refresh/refresher/JwtRefresher.java deleted file mode 100644 index f31eba79e..000000000 --- a/src/main/java/com/somemore/auth/jwt/refresh/refresher/JwtRefresher.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.somemore.auth.jwt.refresh.refresher; - -import com.somemore.auth.jwt.domain.EncodedToken; - -public interface JwtRefresher { - EncodedToken refreshAccessToken(EncodedToken accessToken); -} diff --git a/src/main/java/com/somemore/auth/jwt/validator/JwtValidator.java b/src/main/java/com/somemore/auth/jwt/validator/JwtValidator.java deleted file mode 100644 index 9f0d6b08b..000000000 --- a/src/main/java/com/somemore/auth/jwt/validator/JwtValidator.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.somemore.auth.jwt.validator; - -import com.somemore.auth.jwt.domain.EncodedToken; - -public interface JwtValidator { - void validateToken(EncodedToken token); -} diff --git a/src/main/java/com/somemore/center/controller/CenterProfileCommandApiController.java b/src/main/java/com/somemore/center/controller/CenterProfileCommandApiController.java index 2acd0c6d9..cc5b8a47f 100644 --- a/src/main/java/com/somemore/center/controller/CenterProfileCommandApiController.java +++ b/src/main/java/com/somemore/center/controller/CenterProfileCommandApiController.java @@ -1,11 +1,11 @@ package com.somemore.center.controller; -import com.somemore.auth.annotation.CurrentUser; +import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.center.dto.request.CenterProfileUpdateRequestDto; import com.somemore.center.usecase.command.UpdateCenterProfileUseCase; import com.somemore.global.common.response.ApiResponse; -import com.somemore.imageupload.dto.ImageUploadRequestDto; -import com.somemore.imageupload.usecase.ImageUploadUseCase; +import com.somemore.global.imageupload.dto.ImageUploadRequestDto; +import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; diff --git a/src/main/java/com/somemore/center/controller/CenterSignController.java b/src/main/java/com/somemore/center/controller/CenterSignController.java index a79b3418b..30e53c90f 100644 --- a/src/main/java/com/somemore/center/controller/CenterSignController.java +++ b/src/main/java/com/somemore/center/controller/CenterSignController.java @@ -1,6 +1,6 @@ package com.somemore.center.controller; -import com.somemore.auth.signout.usecase.SignOutUseCase; +import com.somemore.global.auth.signout.usecase.SignOutUseCase; import com.somemore.center.dto.request.CenterSignRequestDto; import com.somemore.global.common.response.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/src/main/java/com/somemore/center/controller/PreferItemCommandApiController.java b/src/main/java/com/somemore/center/controller/PreferItemCommandApiController.java index 416cb9b1a..f0cc8af40 100644 --- a/src/main/java/com/somemore/center/controller/PreferItemCommandApiController.java +++ b/src/main/java/com/somemore/center/controller/PreferItemCommandApiController.java @@ -1,6 +1,6 @@ package com.somemore.center.controller; -import com.somemore.auth.annotation.CurrentUser; +import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.center.dto.request.PreferItemCreateRequestDto; import com.somemore.center.dto.response.PreferItemCreateResponseDto; import com.somemore.center.usecase.command.CreatePreferItemUseCase; diff --git a/src/main/java/com/somemore/community/controller/CommunityBoardCommandApiController.java b/src/main/java/com/somemore/community/controller/CommunityBoardCommandApiController.java index 44ff7957d..20a58a0ab 100644 --- a/src/main/java/com/somemore/community/controller/CommunityBoardCommandApiController.java +++ b/src/main/java/com/somemore/community/controller/CommunityBoardCommandApiController.java @@ -1,14 +1,14 @@ package com.somemore.community.controller; -import com.somemore.auth.annotation.CurrentUser; +import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; import com.somemore.community.dto.request.CommunityBoardUpdateRequestDto; import com.somemore.community.usecase.board.CreateCommunityBoardUseCase; import com.somemore.community.usecase.board.DeleteCommunityBoardUseCase; import com.somemore.community.usecase.board.UpdateCommunityBoardUseCase; import com.somemore.global.common.response.ApiResponse; -import com.somemore.imageupload.dto.ImageUploadRequestDto; -import com.somemore.imageupload.usecase.ImageUploadUseCase; +import com.somemore.global.imageupload.dto.ImageUploadRequestDto; +import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; diff --git a/src/main/java/com/somemore/community/controller/CommunityCommentCommandApiController.java b/src/main/java/com/somemore/community/controller/CommunityCommentCommandApiController.java index de3cdab0e..6e16b564d 100644 --- a/src/main/java/com/somemore/community/controller/CommunityCommentCommandApiController.java +++ b/src/main/java/com/somemore/community/controller/CommunityCommentCommandApiController.java @@ -1,6 +1,6 @@ package com.somemore.community.controller; -import com.somemore.auth.annotation.CurrentUser; +import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.community.dto.request.CommunityCommentCreateRequestDto; import com.somemore.community.dto.request.CommunityCommentUpdateRequestDto; import com.somemore.community.usecase.comment.CreateCommunityCommentUseCase; diff --git a/src/main/java/com/somemore/develop/controller/TokenGenerateMachine.java b/src/main/java/com/somemore/develop/controller/TokenGenerateMachine.java index 888e5a094..9a4270dae 100644 --- a/src/main/java/com/somemore/develop/controller/TokenGenerateMachine.java +++ b/src/main/java/com/somemore/develop/controller/TokenGenerateMachine.java @@ -1,9 +1,9 @@ package com.somemore.develop.controller; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.domain.TokenType; -import com.somemore.auth.jwt.domain.UserRole; -import com.somemore.auth.jwt.generator.JwtGenerator; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.domain.TokenType; +import com.somemore.global.auth.jwt.domain.UserRole; +import com.somemore.global.auth.jwt.generator.JwtGenerator; import com.somemore.global.common.response.ApiResponse; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.GetMapping; diff --git a/src/main/java/com/somemore/auth/annotation/CurrentUser.java b/src/main/java/com/somemore/global/auth/annotation/CurrentUser.java similarity index 90% rename from src/main/java/com/somemore/auth/annotation/CurrentUser.java rename to src/main/java/com/somemore/global/auth/annotation/CurrentUser.java index d6773bef5..922575ae1 100644 --- a/src/main/java/com/somemore/auth/annotation/CurrentUser.java +++ b/src/main/java/com/somemore/global/auth/annotation/CurrentUser.java @@ -1,4 +1,4 @@ -package com.somemore.auth.annotation; +package com.somemore.global.auth.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/com/somemore/auth/authentication/JwtAuthenticationToken.java b/src/main/java/com/somemore/global/auth/authentication/JwtAuthenticationToken.java similarity index 95% rename from src/main/java/com/somemore/auth/authentication/JwtAuthenticationToken.java rename to src/main/java/com/somemore/global/auth/authentication/JwtAuthenticationToken.java index 3703562b1..9c8eb4d9e 100644 --- a/src/main/java/com/somemore/auth/authentication/JwtAuthenticationToken.java +++ b/src/main/java/com/somemore/global/auth/authentication/JwtAuthenticationToken.java @@ -1,4 +1,4 @@ -package com.somemore.auth.authentication; +package com.somemore.global.auth.authentication; import lombok.EqualsAndHashCode; import org.springframework.security.authentication.AbstractAuthenticationToken; diff --git a/src/main/java/com/somemore/auth/controller/UserInfoQueryController.java b/src/main/java/com/somemore/global/auth/controller/UserInfoQueryController.java similarity index 81% rename from src/main/java/com/somemore/auth/controller/UserInfoQueryController.java rename to src/main/java/com/somemore/global/auth/controller/UserInfoQueryController.java index 6442ad8c2..5c0608701 100644 --- a/src/main/java/com/somemore/auth/controller/UserInfoQueryController.java +++ b/src/main/java/com/somemore/global/auth/controller/UserInfoQueryController.java @@ -1,6 +1,7 @@ -package com.somemore.auth.controller; +package com.somemore.global.auth.controller; -import com.somemore.auth.dto.UserInfoResponseDto; +import com.somemore.global.auth.dto.UserInfoResponseDto; +import com.somemore.global.auth.jwt.exception.JwtErrorType; import com.somemore.global.common.response.ApiResponse; import com.somemore.global.exception.BadRequestException; import lombok.RequiredArgsConstructor; @@ -11,8 +12,6 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import static com.somemore.auth.jwt.exception.JwtErrorType.INVALID_TOKEN; - @RestController @RequiredArgsConstructor @RequestMapping("/api/token") @@ -26,7 +25,7 @@ public ApiResponse getUserInfoBySCH() { String role = authentication.getAuthorities().stream() .findFirst() .map(GrantedAuthority::getAuthority) - .orElseThrow(() -> new BadRequestException(INVALID_TOKEN.getMessage())); + .orElseThrow(() -> new BadRequestException(JwtErrorType.INVALID_TOKEN.getMessage())); return ApiResponse.ok(200, new UserInfoResponseDto(userId, role), diff --git a/src/main/java/com/somemore/auth/cookie/CookieService.java b/src/main/java/com/somemore/global/auth/cookie/CookieService.java similarity index 93% rename from src/main/java/com/somemore/auth/cookie/CookieService.java rename to src/main/java/com/somemore/global/auth/cookie/CookieService.java index 3c3804c95..b3f5e4fc5 100644 --- a/src/main/java/com/somemore/auth/cookie/CookieService.java +++ b/src/main/java/com/somemore/global/auth/cookie/CookieService.java @@ -1,6 +1,6 @@ -package com.somemore.auth.cookie; +package com.somemore.global.auth.cookie; -import com.somemore.auth.jwt.domain.TokenType; +import com.somemore.global.auth.jwt.domain.TokenType; import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/com/somemore/auth/cookie/CookieUseCase.java b/src/main/java/com/somemore/global/auth/cookie/CookieUseCase.java similarity index 83% rename from src/main/java/com/somemore/auth/cookie/CookieUseCase.java rename to src/main/java/com/somemore/global/auth/cookie/CookieUseCase.java index 40f5e04f5..5c41dadeb 100644 --- a/src/main/java/com/somemore/auth/cookie/CookieUseCase.java +++ b/src/main/java/com/somemore/global/auth/cookie/CookieUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.auth.cookie; +package com.somemore.global.auth.cookie; import jakarta.servlet.http.HttpServletResponse; diff --git a/src/main/java/com/somemore/auth/dto/UserInfoResponseDto.java b/src/main/java/com/somemore/global/auth/dto/UserInfoResponseDto.java similarity index 90% rename from src/main/java/com/somemore/auth/dto/UserInfoResponseDto.java rename to src/main/java/com/somemore/global/auth/dto/UserInfoResponseDto.java index 0f326bfc8..3347c6f9a 100644 --- a/src/main/java/com/somemore/auth/dto/UserInfoResponseDto.java +++ b/src/main/java/com/somemore/global/auth/dto/UserInfoResponseDto.java @@ -1,4 +1,4 @@ -package com.somemore.auth.dto; +package com.somemore.global.auth.dto; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; @@ -13,4 +13,4 @@ public record UserInfoResponseDto( @Schema(description = "유저 ROLE") String role ) { -} \ No newline at end of file +} diff --git a/src/main/java/com/somemore/auth/idpw/filter/IdPwAuthFilter.java b/src/main/java/com/somemore/global/auth/idpw/filter/IdPwAuthFilter.java similarity index 91% rename from src/main/java/com/somemore/auth/idpw/filter/IdPwAuthFilter.java rename to src/main/java/com/somemore/global/auth/idpw/filter/IdPwAuthFilter.java index 318f0df84..1847b7335 100644 --- a/src/main/java/com/somemore/auth/idpw/filter/IdPwAuthFilter.java +++ b/src/main/java/com/somemore/global/auth/idpw/filter/IdPwAuthFilter.java @@ -1,10 +1,10 @@ -package com.somemore.auth.idpw.filter; +package com.somemore.global.auth.idpw.filter; import com.fasterxml.jackson.databind.ObjectMapper; -import com.somemore.auth.cookie.CookieUseCase; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.domain.UserRole; -import com.somemore.auth.jwt.usecase.GenerateTokensOnLoginUseCase; +import com.somemore.global.auth.cookie.CookieUseCase; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.domain.UserRole; +import com.somemore.global.auth.jwt.usecase.GenerateTokensOnLoginUseCase; import jakarta.servlet.FilterChain; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; @@ -69,4 +69,4 @@ private ProblemDetail buildUnauthorizedProblemDetail(AuthenticationException e) problemDetail.setProperty("timestamp", System.currentTimeMillis()); return problemDetail; } -} \ No newline at end of file +} diff --git a/src/main/java/com/somemore/auth/idpw/provider/CustomAuthenticationProvider.java b/src/main/java/com/somemore/global/auth/idpw/provider/CustomAuthenticationProvider.java similarity index 85% rename from src/main/java/com/somemore/auth/idpw/provider/CustomAuthenticationProvider.java rename to src/main/java/com/somemore/global/auth/idpw/provider/CustomAuthenticationProvider.java index 48b10c0f5..d122a5c57 100644 --- a/src/main/java/com/somemore/auth/idpw/provider/CustomAuthenticationProvider.java +++ b/src/main/java/com/somemore/global/auth/idpw/provider/CustomAuthenticationProvider.java @@ -1,10 +1,10 @@ -package com.somemore.auth.idpw.provider; +package com.somemore.global.auth.idpw.provider; -import com.somemore.auth.authentication.JwtAuthenticationToken; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.domain.TokenType; -import com.somemore.auth.jwt.domain.UserRole; -import com.somemore.auth.jwt.usecase.JwtUseCase; +import com.somemore.global.auth.authentication.JwtAuthenticationToken; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.domain.TokenType; +import com.somemore.global.auth.jwt.domain.UserRole; +import com.somemore.global.auth.jwt.usecase.JwtUseCase; import com.somemore.center.usecase.query.CenterSignUseCase; import lombok.RequiredArgsConstructor; import org.springframework.security.authentication.AuthenticationProvider; diff --git a/src/main/java/com/somemore/auth/jwt/config/JwtConfig.java b/src/main/java/com/somemore/global/auth/jwt/config/JwtConfig.java similarity index 91% rename from src/main/java/com/somemore/auth/jwt/config/JwtConfig.java rename to src/main/java/com/somemore/global/auth/jwt/config/JwtConfig.java index 622f95f07..03d12fe6c 100644 --- a/src/main/java/com/somemore/auth/jwt/config/JwtConfig.java +++ b/src/main/java/com/somemore/global/auth/jwt/config/JwtConfig.java @@ -1,4 +1,4 @@ -package com.somemore.auth.jwt.config; +package com.somemore.global.auth.jwt.config; import io.jsonwebtoken.security.Keys; import org.springframework.beans.factory.annotation.Value; diff --git a/src/main/java/com/somemore/auth/jwt/domain/EncodedToken.java b/src/main/java/com/somemore/global/auth/jwt/domain/EncodedToken.java similarity index 82% rename from src/main/java/com/somemore/auth/jwt/domain/EncodedToken.java rename to src/main/java/com/somemore/global/auth/jwt/domain/EncodedToken.java index fdfc04dc1..c5e5a1cb3 100644 --- a/src/main/java/com/somemore/auth/jwt/domain/EncodedToken.java +++ b/src/main/java/com/somemore/global/auth/jwt/domain/EncodedToken.java @@ -1,8 +1,8 @@ -package com.somemore.auth.jwt.domain; +package com.somemore.global.auth.jwt.domain; public record EncodedToken(String value) { - private final static String UNINITIALIZED = "UNINITIALIZED"; + private static final String UNINITIALIZED = "UNINITIALIZED"; public boolean isUninitialized() { return value == null diff --git a/src/main/java/com/somemore/auth/jwt/domain/TokenType.java b/src/main/java/com/somemore/global/auth/jwt/domain/TokenType.java similarity index 87% rename from src/main/java/com/somemore/auth/jwt/domain/TokenType.java rename to src/main/java/com/somemore/global/auth/jwt/domain/TokenType.java index e6ea4638e..7b91403e2 100644 --- a/src/main/java/com/somemore/auth/jwt/domain/TokenType.java +++ b/src/main/java/com/somemore/global/auth/jwt/domain/TokenType.java @@ -1,4 +1,4 @@ -package com.somemore.auth.jwt.domain; +package com.somemore.global.auth.jwt.domain; import lombok.Getter; diff --git a/src/main/java/com/somemore/auth/jwt/domain/UserRole.java b/src/main/java/com/somemore/global/auth/jwt/domain/UserRole.java similarity index 72% rename from src/main/java/com/somemore/auth/jwt/domain/UserRole.java rename to src/main/java/com/somemore/global/auth/jwt/domain/UserRole.java index 6bc917e0e..4195fe5bd 100644 --- a/src/main/java/com/somemore/auth/jwt/domain/UserRole.java +++ b/src/main/java/com/somemore/global/auth/jwt/domain/UserRole.java @@ -1,11 +1,10 @@ -package com.somemore.auth.jwt.domain; +package com.somemore.global.auth.jwt.domain; -import com.somemore.auth.jwt.exception.JwtException; +import com.somemore.global.auth.jwt.exception.JwtException; +import com.somemore.global.auth.jwt.exception.JwtErrorType; import lombok.RequiredArgsConstructor; import org.springframework.security.core.GrantedAuthority; -import static com.somemore.auth.jwt.exception.JwtErrorType.UNKNOWN_ERROR; - @RequiredArgsConstructor public enum UserRole implements GrantedAuthority { VOLUNTEER("ROLE_VOLUNTEER"), @@ -25,6 +24,6 @@ public static UserRole from(String role) { return userRole; } } - throw new JwtException(UNKNOWN_ERROR); + throw new JwtException(JwtErrorType.UNKNOWN_ERROR); } } diff --git a/src/main/java/com/somemore/auth/jwt/exception/JwtErrorType.java b/src/main/java/com/somemore/global/auth/jwt/exception/JwtErrorType.java similarity index 89% rename from src/main/java/com/somemore/auth/jwt/exception/JwtErrorType.java rename to src/main/java/com/somemore/global/auth/jwt/exception/JwtErrorType.java index 92a624305..5a82c389a 100644 --- a/src/main/java/com/somemore/auth/jwt/exception/JwtErrorType.java +++ b/src/main/java/com/somemore/global/auth/jwt/exception/JwtErrorType.java @@ -1,4 +1,4 @@ -package com.somemore.auth.jwt.exception; +package com.somemore.global.auth.jwt.exception; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/auth/jwt/exception/JwtException.java b/src/main/java/com/somemore/global/auth/jwt/exception/JwtException.java similarity index 84% rename from src/main/java/com/somemore/auth/jwt/exception/JwtException.java rename to src/main/java/com/somemore/global/auth/jwt/exception/JwtException.java index 406935484..ac2b23360 100644 --- a/src/main/java/com/somemore/auth/jwt/exception/JwtException.java +++ b/src/main/java/com/somemore/global/auth/jwt/exception/JwtException.java @@ -1,4 +1,4 @@ -package com.somemore.auth.jwt.exception; +package com.somemore.global.auth.jwt.exception; import lombok.Getter; diff --git a/src/main/java/com/somemore/auth/jwt/filter/JwtAuthFilter.java b/src/main/java/com/somemore/global/auth/jwt/filter/JwtAuthFilter.java similarity index 90% rename from src/main/java/com/somemore/auth/jwt/filter/JwtAuthFilter.java rename to src/main/java/com/somemore/global/auth/jwt/filter/JwtAuthFilter.java index 47b4e4281..4d7a6ebee 100644 --- a/src/main/java/com/somemore/auth/jwt/filter/JwtAuthFilter.java +++ b/src/main/java/com/somemore/global/auth/jwt/filter/JwtAuthFilter.java @@ -1,11 +1,11 @@ -package com.somemore.auth.jwt.filter; - -import com.somemore.auth.authentication.JwtAuthenticationToken; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.domain.TokenType; -import com.somemore.auth.jwt.exception.JwtErrorType; -import com.somemore.auth.jwt.exception.JwtException; -import com.somemore.auth.jwt.usecase.JwtUseCase; +package com.somemore.global.auth.jwt.filter; + +import com.somemore.global.auth.authentication.JwtAuthenticationToken; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.domain.TokenType; +import com.somemore.global.auth.jwt.exception.JwtErrorType; +import com.somemore.global.auth.jwt.exception.JwtException; +import com.somemore.global.auth.jwt.usecase.JwtUseCase; import io.jsonwebtoken.Claims; import jakarta.servlet.FilterChain; import jakarta.servlet.ServletException; diff --git a/src/main/java/com/somemore/auth/jwt/filter/JwtExceptionFilter.java b/src/main/java/com/somemore/global/auth/jwt/filter/JwtExceptionFilter.java similarity index 95% rename from src/main/java/com/somemore/auth/jwt/filter/JwtExceptionFilter.java rename to src/main/java/com/somemore/global/auth/jwt/filter/JwtExceptionFilter.java index 6523550d1..17fe0643c 100644 --- a/src/main/java/com/somemore/auth/jwt/filter/JwtExceptionFilter.java +++ b/src/main/java/com/somemore/global/auth/jwt/filter/JwtExceptionFilter.java @@ -1,7 +1,7 @@ -package com.somemore.auth.jwt.filter; +package com.somemore.global.auth.jwt.filter; import com.fasterxml.jackson.databind.ObjectMapper; -import com.somemore.auth.jwt.exception.JwtException; +import com.somemore.global.auth.jwt.exception.JwtException; import jakarta.servlet.FilterChain; import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; diff --git a/src/main/java/com/somemore/auth/jwt/generator/HmacJwtGenerator.java b/src/main/java/com/somemore/global/auth/jwt/generator/HmacJwtGenerator.java similarity index 89% rename from src/main/java/com/somemore/auth/jwt/generator/HmacJwtGenerator.java rename to src/main/java/com/somemore/global/auth/jwt/generator/HmacJwtGenerator.java index 26f686c79..6cb909011 100644 --- a/src/main/java/com/somemore/auth/jwt/generator/HmacJwtGenerator.java +++ b/src/main/java/com/somemore/global/auth/jwt/generator/HmacJwtGenerator.java @@ -1,7 +1,7 @@ -package com.somemore.auth.jwt.generator; +package com.somemore.global.auth.jwt.generator; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.domain.TokenType; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.domain.TokenType; import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.security.MacAlgorithm; diff --git a/src/main/java/com/somemore/global/auth/jwt/generator/JwtGenerator.java b/src/main/java/com/somemore/global/auth/jwt/generator/JwtGenerator.java new file mode 100644 index 000000000..9261bbaf6 --- /dev/null +++ b/src/main/java/com/somemore/global/auth/jwt/generator/JwtGenerator.java @@ -0,0 +1,8 @@ +package com.somemore.global.auth.jwt.generator; + +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.domain.TokenType; + +public interface JwtGenerator { + EncodedToken generateToken(String userId, String role, TokenType tokenType); +} diff --git a/src/main/java/com/somemore/auth/jwt/parser/DefaultJwtParser.java b/src/main/java/com/somemore/global/auth/jwt/parser/DefaultJwtParser.java similarity index 81% rename from src/main/java/com/somemore/auth/jwt/parser/DefaultJwtParser.java rename to src/main/java/com/somemore/global/auth/jwt/parser/DefaultJwtParser.java index c7c453da6..a361c8122 100644 --- a/src/main/java/com/somemore/auth/jwt/parser/DefaultJwtParser.java +++ b/src/main/java/com/somemore/global/auth/jwt/parser/DefaultJwtParser.java @@ -1,8 +1,8 @@ -package com.somemore.auth.jwt.parser; +package com.somemore.global.auth.jwt.parser; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.exception.JwtErrorType; -import com.somemore.auth.jwt.exception.JwtException; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.exception.JwtErrorType; +import com.somemore.global.auth.jwt.exception.JwtException; import io.jsonwebtoken.Claims; import io.jsonwebtoken.ExpiredJwtException; import io.jsonwebtoken.Jwts; diff --git a/src/main/java/com/somemore/auth/jwt/parser/JwtParser.java b/src/main/java/com/somemore/global/auth/jwt/parser/JwtParser.java similarity index 51% rename from src/main/java/com/somemore/auth/jwt/parser/JwtParser.java rename to src/main/java/com/somemore/global/auth/jwt/parser/JwtParser.java index d8d9ff66b..6d3b44c33 100644 --- a/src/main/java/com/somemore/auth/jwt/parser/JwtParser.java +++ b/src/main/java/com/somemore/global/auth/jwt/parser/JwtParser.java @@ -1,6 +1,6 @@ -package com.somemore.auth.jwt.parser; +package com.somemore.global.auth.jwt.parser; -import com.somemore.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.domain.EncodedToken; import io.jsonwebtoken.Claims; public interface JwtParser { diff --git a/src/main/java/com/somemore/auth/jwt/refresh/domain/RefreshToken.java b/src/main/java/com/somemore/global/auth/jwt/refresh/domain/RefreshToken.java similarity index 89% rename from src/main/java/com/somemore/auth/jwt/refresh/domain/RefreshToken.java rename to src/main/java/com/somemore/global/auth/jwt/refresh/domain/RefreshToken.java index 05a8a99bf..e1368c9d9 100644 --- a/src/main/java/com/somemore/auth/jwt/refresh/domain/RefreshToken.java +++ b/src/main/java/com/somemore/global/auth/jwt/refresh/domain/RefreshToken.java @@ -1,6 +1,6 @@ -package com.somemore.auth.jwt.refresh.domain; +package com.somemore.global.auth.jwt.refresh.domain; -import com.somemore.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.domain.EncodedToken; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; diff --git a/src/main/java/com/somemore/auth/jwt/refresh/manager/RedisRefreshTokenManager.java b/src/main/java/com/somemore/global/auth/jwt/refresh/manager/RedisRefreshTokenManager.java similarity index 68% rename from src/main/java/com/somemore/auth/jwt/refresh/manager/RedisRefreshTokenManager.java rename to src/main/java/com/somemore/global/auth/jwt/refresh/manager/RedisRefreshTokenManager.java index 9f717056c..84e88b4bd 100644 --- a/src/main/java/com/somemore/auth/jwt/refresh/manager/RedisRefreshTokenManager.java +++ b/src/main/java/com/somemore/global/auth/jwt/refresh/manager/RedisRefreshTokenManager.java @@ -1,10 +1,10 @@ -package com.somemore.auth.jwt.refresh.manager; +package com.somemore.global.auth.jwt.refresh.manager; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.exception.JwtErrorType; -import com.somemore.auth.jwt.exception.JwtException; -import com.somemore.auth.jwt.refresh.domain.RefreshToken; -import com.somemore.auth.jwt.refresh.repository.RefreshTokenRepository; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.exception.JwtErrorType; +import com.somemore.global.auth.jwt.exception.JwtException; +import com.somemore.global.auth.jwt.refresh.domain.RefreshToken; +import com.somemore.global.auth.jwt.refresh.repository.RefreshTokenRepository; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/auth/jwt/refresh/manager/RefreshTokenManager.java b/src/main/java/com/somemore/global/auth/jwt/refresh/manager/RefreshTokenManager.java similarity index 52% rename from src/main/java/com/somemore/auth/jwt/refresh/manager/RefreshTokenManager.java rename to src/main/java/com/somemore/global/auth/jwt/refresh/manager/RefreshTokenManager.java index ec2c0b1a7..c2343b094 100644 --- a/src/main/java/com/somemore/auth/jwt/refresh/manager/RefreshTokenManager.java +++ b/src/main/java/com/somemore/global/auth/jwt/refresh/manager/RefreshTokenManager.java @@ -1,7 +1,7 @@ -package com.somemore.auth.jwt.refresh.manager; +package com.somemore.global.auth.jwt.refresh.manager; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.refresh.domain.RefreshToken; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.refresh.domain.RefreshToken; public interface RefreshTokenManager { RefreshToken findRefreshToken(EncodedToken accessToken); diff --git a/src/main/java/com/somemore/auth/jwt/refresh/refresher/DefaultJwtRefresher.java b/src/main/java/com/somemore/global/auth/jwt/refresh/refresher/DefaultJwtRefresher.java similarity index 72% rename from src/main/java/com/somemore/auth/jwt/refresh/refresher/DefaultJwtRefresher.java rename to src/main/java/com/somemore/global/auth/jwt/refresh/refresher/DefaultJwtRefresher.java index 262479eac..a9f492276 100644 --- a/src/main/java/com/somemore/auth/jwt/refresh/refresher/DefaultJwtRefresher.java +++ b/src/main/java/com/somemore/global/auth/jwt/refresh/refresher/DefaultJwtRefresher.java @@ -1,12 +1,12 @@ -package com.somemore.auth.jwt.refresh.refresher; +package com.somemore.global.auth.jwt.refresh.refresher; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.domain.TokenType; -import com.somemore.auth.jwt.generator.JwtGenerator; -import com.somemore.auth.jwt.parser.JwtParser; -import com.somemore.auth.jwt.refresh.domain.RefreshToken; -import com.somemore.auth.jwt.refresh.manager.RefreshTokenManager; -import com.somemore.auth.jwt.validator.JwtValidator; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.domain.TokenType; +import com.somemore.global.auth.jwt.generator.JwtGenerator; +import com.somemore.global.auth.jwt.parser.JwtParser; +import com.somemore.global.auth.jwt.refresh.domain.RefreshToken; +import com.somemore.global.auth.jwt.refresh.manager.RefreshTokenManager; +import com.somemore.global.auth.jwt.validator.JwtValidator; import io.jsonwebtoken.Claims; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/com/somemore/global/auth/jwt/refresh/refresher/JwtRefresher.java b/src/main/java/com/somemore/global/auth/jwt/refresh/refresher/JwtRefresher.java new file mode 100644 index 000000000..962deb2a9 --- /dev/null +++ b/src/main/java/com/somemore/global/auth/jwt/refresh/refresher/JwtRefresher.java @@ -0,0 +1,7 @@ +package com.somemore.global.auth.jwt.refresh.refresher; + +import com.somemore.global.auth.jwt.domain.EncodedToken; + +public interface JwtRefresher { + EncodedToken refreshAccessToken(EncodedToken accessToken); +} diff --git a/src/main/java/com/somemore/auth/jwt/refresh/repository/RefreshTokenRepository.java b/src/main/java/com/somemore/global/auth/jwt/refresh/repository/RefreshTokenRepository.java similarity index 74% rename from src/main/java/com/somemore/auth/jwt/refresh/repository/RefreshTokenRepository.java rename to src/main/java/com/somemore/global/auth/jwt/refresh/repository/RefreshTokenRepository.java index 31a566751..289ac501b 100644 --- a/src/main/java/com/somemore/auth/jwt/refresh/repository/RefreshTokenRepository.java +++ b/src/main/java/com/somemore/global/auth/jwt/refresh/repository/RefreshTokenRepository.java @@ -1,6 +1,6 @@ -package com.somemore.auth.jwt.refresh.repository; +package com.somemore.global.auth.jwt.refresh.repository; -import com.somemore.auth.jwt.refresh.domain.RefreshToken; +import com.somemore.global.auth.jwt.refresh.domain.RefreshToken; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; diff --git a/src/main/java/com/somemore/auth/jwt/service/GenerateTokensOnLoginService.java b/src/main/java/com/somemore/global/auth/jwt/service/GenerateTokensOnLoginService.java similarity index 74% rename from src/main/java/com/somemore/auth/jwt/service/GenerateTokensOnLoginService.java rename to src/main/java/com/somemore/global/auth/jwt/service/GenerateTokensOnLoginService.java index 414967e26..5d41cf234 100644 --- a/src/main/java/com/somemore/auth/jwt/service/GenerateTokensOnLoginService.java +++ b/src/main/java/com/somemore/global/auth/jwt/service/GenerateTokensOnLoginService.java @@ -1,12 +1,12 @@ -package com.somemore.auth.jwt.service; - -import com.somemore.auth.jwt.domain.UserRole; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.domain.TokenType; -import com.somemore.auth.jwt.generator.JwtGenerator; -import com.somemore.auth.jwt.refresh.domain.RefreshToken; -import com.somemore.auth.jwt.refresh.manager.RefreshTokenManager; -import com.somemore.auth.jwt.usecase.GenerateTokensOnLoginUseCase; +package com.somemore.global.auth.jwt.service; + +import com.somemore.global.auth.jwt.domain.UserRole; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.domain.TokenType; +import com.somemore.global.auth.jwt.generator.JwtGenerator; +import com.somemore.global.auth.jwt.refresh.domain.RefreshToken; +import com.somemore.global.auth.jwt.refresh.manager.RefreshTokenManager; +import com.somemore.global.auth.jwt.usecase.GenerateTokensOnLoginUseCase; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/auth/jwt/service/JwtService.java b/src/main/java/com/somemore/global/auth/jwt/service/JwtService.java similarity index 70% rename from src/main/java/com/somemore/auth/jwt/service/JwtService.java rename to src/main/java/com/somemore/global/auth/jwt/service/JwtService.java index 6bf18ba98..6321821bf 100644 --- a/src/main/java/com/somemore/auth/jwt/service/JwtService.java +++ b/src/main/java/com/somemore/global/auth/jwt/service/JwtService.java @@ -1,15 +1,15 @@ -package com.somemore.auth.jwt.service; +package com.somemore.global.auth.jwt.service; -import com.somemore.auth.cookie.CookieUseCase; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.domain.TokenType; -import com.somemore.auth.jwt.exception.JwtErrorType; -import com.somemore.auth.jwt.exception.JwtException; -import com.somemore.auth.jwt.generator.JwtGenerator; -import com.somemore.auth.jwt.parser.JwtParser; -import com.somemore.auth.jwt.refresh.refresher.JwtRefresher; -import com.somemore.auth.jwt.usecase.JwtUseCase; -import com.somemore.auth.jwt.validator.JwtValidator; +import com.somemore.global.auth.cookie.CookieUseCase; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.domain.TokenType; +import com.somemore.global.auth.jwt.exception.JwtErrorType; +import com.somemore.global.auth.jwt.exception.JwtException; +import com.somemore.global.auth.jwt.generator.JwtGenerator; +import com.somemore.global.auth.jwt.parser.JwtParser; +import com.somemore.global.auth.jwt.refresh.refresher.JwtRefresher; +import com.somemore.global.auth.jwt.usecase.JwtUseCase; +import com.somemore.global.auth.jwt.validator.JwtValidator; import io.jsonwebtoken.Claims; import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/auth/jwt/usecase/GenerateTokensOnLoginUseCase.java b/src/main/java/com/somemore/global/auth/jwt/usecase/GenerateTokensOnLoginUseCase.java similarity index 50% rename from src/main/java/com/somemore/auth/jwt/usecase/GenerateTokensOnLoginUseCase.java rename to src/main/java/com/somemore/global/auth/jwt/usecase/GenerateTokensOnLoginUseCase.java index 78ab0a882..f17795775 100644 --- a/src/main/java/com/somemore/auth/jwt/usecase/GenerateTokensOnLoginUseCase.java +++ b/src/main/java/com/somemore/global/auth/jwt/usecase/GenerateTokensOnLoginUseCase.java @@ -1,7 +1,7 @@ -package com.somemore.auth.jwt.usecase; +package com.somemore.global.auth.jwt.usecase; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.domain.UserRole; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.domain.UserRole; import java.util.UUID; diff --git a/src/main/java/com/somemore/auth/jwt/usecase/JwtUseCase.java b/src/main/java/com/somemore/global/auth/jwt/usecase/JwtUseCase.java similarity index 67% rename from src/main/java/com/somemore/auth/jwt/usecase/JwtUseCase.java rename to src/main/java/com/somemore/global/auth/jwt/usecase/JwtUseCase.java index 8c43d4e99..7e48d8599 100644 --- a/src/main/java/com/somemore/auth/jwt/usecase/JwtUseCase.java +++ b/src/main/java/com/somemore/global/auth/jwt/usecase/JwtUseCase.java @@ -1,7 +1,7 @@ -package com.somemore.auth.jwt.usecase; +package com.somemore.global.auth.jwt.usecase; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.domain.TokenType; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.domain.TokenType; import io.jsonwebtoken.Claims; import jakarta.servlet.http.HttpServletResponse; diff --git a/src/main/java/com/somemore/auth/jwt/validator/DefaultJwtValidator.java b/src/main/java/com/somemore/global/auth/jwt/validator/DefaultJwtValidator.java similarity index 71% rename from src/main/java/com/somemore/auth/jwt/validator/DefaultJwtValidator.java rename to src/main/java/com/somemore/global/auth/jwt/validator/DefaultJwtValidator.java index 1b313dbfa..34b25be97 100644 --- a/src/main/java/com/somemore/auth/jwt/validator/DefaultJwtValidator.java +++ b/src/main/java/com/somemore/global/auth/jwt/validator/DefaultJwtValidator.java @@ -1,9 +1,9 @@ -package com.somemore.auth.jwt.validator; +package com.somemore.global.auth.jwt.validator; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.exception.JwtErrorType; -import com.somemore.auth.jwt.exception.JwtException; -import com.somemore.auth.jwt.parser.DefaultJwtParser; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.exception.JwtErrorType; +import com.somemore.global.auth.jwt.exception.JwtException; +import com.somemore.global.auth.jwt.parser.DefaultJwtParser; import io.jsonwebtoken.Claims; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; diff --git a/src/main/java/com/somemore/global/auth/jwt/validator/JwtValidator.java b/src/main/java/com/somemore/global/auth/jwt/validator/JwtValidator.java new file mode 100644 index 000000000..2d02a1463 --- /dev/null +++ b/src/main/java/com/somemore/global/auth/jwt/validator/JwtValidator.java @@ -0,0 +1,7 @@ +package com.somemore.global.auth.jwt.validator; + +import com.somemore.global.auth.jwt.domain.EncodedToken; + +public interface JwtValidator { + void validateToken(EncodedToken token); +} diff --git a/src/main/java/com/somemore/auth/oauth/OAuthProvider.java b/src/main/java/com/somemore/global/auth/oauth/OAuthProvider.java similarity index 93% rename from src/main/java/com/somemore/auth/oauth/OAuthProvider.java rename to src/main/java/com/somemore/global/auth/oauth/OAuthProvider.java index bf0a73914..f457de669 100644 --- a/src/main/java/com/somemore/auth/oauth/OAuthProvider.java +++ b/src/main/java/com/somemore/global/auth/oauth/OAuthProvider.java @@ -1,4 +1,4 @@ -package com.somemore.auth.oauth; +package com.somemore.global.auth.oauth; import lombok.Getter; diff --git a/src/main/java/com/somemore/auth/oauth/handler/failure/CustomOAuthFailureHandler.java b/src/main/java/com/somemore/global/auth/oauth/handler/failure/CustomOAuthFailureHandler.java similarity index 93% rename from src/main/java/com/somemore/auth/oauth/handler/failure/CustomOAuthFailureHandler.java rename to src/main/java/com/somemore/global/auth/oauth/handler/failure/CustomOAuthFailureHandler.java index 6c76852bc..7278b423d 100644 --- a/src/main/java/com/somemore/auth/oauth/handler/failure/CustomOAuthFailureHandler.java +++ b/src/main/java/com/somemore/global/auth/oauth/handler/failure/CustomOAuthFailureHandler.java @@ -1,4 +1,4 @@ -package com.somemore.auth.oauth.handler.failure; +package com.somemore.global.auth.oauth.handler.failure; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; diff --git a/src/main/java/com/somemore/auth/oauth/handler/success/CustomOAuthSuccessHandler.java b/src/main/java/com/somemore/global/auth/oauth/handler/success/CustomOAuthSuccessHandler.java similarity index 82% rename from src/main/java/com/somemore/auth/oauth/handler/success/CustomOAuthSuccessHandler.java rename to src/main/java/com/somemore/global/auth/oauth/handler/success/CustomOAuthSuccessHandler.java index 1656c6ed9..00900f4e1 100644 --- a/src/main/java/com/somemore/auth/oauth/handler/success/CustomOAuthSuccessHandler.java +++ b/src/main/java/com/somemore/global/auth/oauth/handler/success/CustomOAuthSuccessHandler.java @@ -1,12 +1,12 @@ -package com.somemore.auth.oauth.handler.success; +package com.somemore.global.auth.oauth.handler.success; -import com.somemore.auth.cookie.CookieUseCase; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.domain.UserRole; -import com.somemore.auth.jwt.usecase.GenerateTokensOnLoginUseCase; -import com.somemore.auth.oauth.OAuthProvider; -import com.somemore.auth.oauth.naver.service.query.ProcessNaverOAuthUserService; -import com.somemore.auth.redirect.RedirectUseCase; +import com.somemore.global.auth.cookie.CookieUseCase; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.domain.UserRole; +import com.somemore.global.auth.jwt.usecase.GenerateTokensOnLoginUseCase; +import com.somemore.global.auth.oauth.OAuthProvider; +import com.somemore.global.auth.oauth.naver.service.query.ProcessNaverOAuthUserService; +import com.somemore.global.auth.redirect.RedirectUseCase; import com.somemore.volunteer.usecase.VolunteerQueryUseCase; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; diff --git a/src/main/java/com/somemore/auth/oauth/naver/domain/NaverUser.java b/src/main/java/com/somemore/global/auth/oauth/naver/domain/NaverUser.java similarity index 89% rename from src/main/java/com/somemore/auth/oauth/naver/domain/NaverUser.java rename to src/main/java/com/somemore/global/auth/oauth/naver/domain/NaverUser.java index c99b56519..fcdf393f5 100644 --- a/src/main/java/com/somemore/auth/oauth/naver/domain/NaverUser.java +++ b/src/main/java/com/somemore/global/auth/oauth/naver/domain/NaverUser.java @@ -1,4 +1,4 @@ -package com.somemore.auth.oauth.naver.domain; +package com.somemore.global.auth.oauth.naver.domain; import jakarta.persistence.Entity; import jakarta.persistence.Id; diff --git a/src/main/java/com/somemore/auth/oauth/naver/dto/response/NaverUserProfileResponseDto.java b/src/main/java/com/somemore/global/auth/oauth/naver/dto/response/NaverUserProfileResponseDto.java similarity index 92% rename from src/main/java/com/somemore/auth/oauth/naver/dto/response/NaverUserProfileResponseDto.java rename to src/main/java/com/somemore/global/auth/oauth/naver/dto/response/NaverUserProfileResponseDto.java index 0d03ca360..f4398060c 100644 --- a/src/main/java/com/somemore/auth/oauth/naver/dto/response/NaverUserProfileResponseDto.java +++ b/src/main/java/com/somemore/global/auth/oauth/naver/dto/response/NaverUserProfileResponseDto.java @@ -1,9 +1,9 @@ -package com.somemore.auth.oauth.naver.dto.response; +package com.somemore.global.auth.oauth.naver.dto.response; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; -import com.somemore.auth.oauth.OAuthProvider; +import com.somemore.global.auth.oauth.OAuthProvider; import com.somemore.volunteer.dto.request.VolunteerRegisterRequestDto; @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) diff --git a/src/main/java/com/somemore/auth/oauth/naver/repository/NaverUserRepository.java b/src/main/java/com/somemore/global/auth/oauth/naver/repository/NaverUserRepository.java similarity index 63% rename from src/main/java/com/somemore/auth/oauth/naver/repository/NaverUserRepository.java rename to src/main/java/com/somemore/global/auth/oauth/naver/repository/NaverUserRepository.java index 5d0128d7f..5b8f93f83 100644 --- a/src/main/java/com/somemore/auth/oauth/naver/repository/NaverUserRepository.java +++ b/src/main/java/com/somemore/global/auth/oauth/naver/repository/NaverUserRepository.java @@ -1,6 +1,6 @@ -package com.somemore.auth.oauth.naver.repository; +package com.somemore.global.auth.oauth.naver.repository; -import com.somemore.auth.oauth.naver.domain.NaverUser; +import com.somemore.global.auth.oauth.naver.domain.NaverUser; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; diff --git a/src/main/java/com/somemore/auth/oauth/naver/service/command/NaverOAuth2UserInfoService.java b/src/main/java/com/somemore/global/auth/oauth/naver/service/command/NaverOAuth2UserInfoService.java similarity index 77% rename from src/main/java/com/somemore/auth/oauth/naver/service/command/NaverOAuth2UserInfoService.java rename to src/main/java/com/somemore/global/auth/oauth/naver/service/command/NaverOAuth2UserInfoService.java index cf6f92d02..a25d8871a 100644 --- a/src/main/java/com/somemore/auth/oauth/naver/service/command/NaverOAuth2UserInfoService.java +++ b/src/main/java/com/somemore/global/auth/oauth/naver/service/command/NaverOAuth2UserInfoService.java @@ -1,9 +1,9 @@ -package com.somemore.auth.oauth.naver.service.command; +package com.somemore.global.auth.oauth.naver.service.command; -import com.somemore.auth.oauth.naver.dto.response.NaverUserProfileResponseDto; -import com.somemore.auth.oauth.naver.usecase.query.CheckNaverUserUseCase; -import com.somemore.auth.oauth.naver.usecase.command.RegisterNaverUserUseCase; -import com.somemore.auth.oauth.naver.util.OAuthResponseConverter; +import com.somemore.global.auth.oauth.naver.dto.response.NaverUserProfileResponseDto; +import com.somemore.global.auth.oauth.naver.usecase.query.CheckNaverUserUseCase; +import com.somemore.global.auth.oauth.naver.usecase.command.RegisterNaverUserUseCase; +import com.somemore.global.auth.oauth.naver.util.OAuthResponseConverter; import com.somemore.volunteer.usecase.RegisterVolunteerUseCase; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/com/somemore/auth/oauth/naver/service/command/RegisterNaverUserService.java b/src/main/java/com/somemore/global/auth/oauth/naver/service/command/RegisterNaverUserService.java similarity index 65% rename from src/main/java/com/somemore/auth/oauth/naver/service/command/RegisterNaverUserService.java rename to src/main/java/com/somemore/global/auth/oauth/naver/service/command/RegisterNaverUserService.java index 29ac3b291..14c2b270b 100644 --- a/src/main/java/com/somemore/auth/oauth/naver/service/command/RegisterNaverUserService.java +++ b/src/main/java/com/somemore/global/auth/oauth/naver/service/command/RegisterNaverUserService.java @@ -1,8 +1,8 @@ -package com.somemore.auth.oauth.naver.service.command; +package com.somemore.global.auth.oauth.naver.service.command; -import com.somemore.auth.oauth.naver.domain.NaverUser; -import com.somemore.auth.oauth.naver.repository.NaverUserRepository; -import com.somemore.auth.oauth.naver.usecase.command.RegisterNaverUserUseCase; +import com.somemore.global.auth.oauth.naver.domain.NaverUser; +import com.somemore.global.auth.oauth.naver.repository.NaverUserRepository; +import com.somemore.global.auth.oauth.naver.usecase.command.RegisterNaverUserUseCase; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/auth/oauth/naver/service/query/CheckNaverUserService.java b/src/main/java/com/somemore/global/auth/oauth/naver/service/query/CheckNaverUserService.java similarity index 70% rename from src/main/java/com/somemore/auth/oauth/naver/service/query/CheckNaverUserService.java rename to src/main/java/com/somemore/global/auth/oauth/naver/service/query/CheckNaverUserService.java index 58e1e99a5..5249c3d6d 100644 --- a/src/main/java/com/somemore/auth/oauth/naver/service/query/CheckNaverUserService.java +++ b/src/main/java/com/somemore/global/auth/oauth/naver/service/query/CheckNaverUserService.java @@ -1,7 +1,7 @@ -package com.somemore.auth.oauth.naver.service.query; +package com.somemore.global.auth.oauth.naver.service.query; -import com.somemore.auth.oauth.naver.repository.NaverUserRepository; -import com.somemore.auth.oauth.naver.usecase.query.CheckNaverUserUseCase; +import com.somemore.global.auth.oauth.naver.repository.NaverUserRepository; +import com.somemore.global.auth.oauth.naver.usecase.query.CheckNaverUserUseCase; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/auth/oauth/naver/service/query/ProcessNaverOAuthUserService.java b/src/main/java/com/somemore/global/auth/oauth/naver/service/query/ProcessNaverOAuthUserService.java similarity index 73% rename from src/main/java/com/somemore/auth/oauth/naver/service/query/ProcessNaverOAuthUserService.java rename to src/main/java/com/somemore/global/auth/oauth/naver/service/query/ProcessNaverOAuthUserService.java index f6d27d6e3..4341b61c1 100644 --- a/src/main/java/com/somemore/auth/oauth/naver/service/query/ProcessNaverOAuthUserService.java +++ b/src/main/java/com/somemore/global/auth/oauth/naver/service/query/ProcessNaverOAuthUserService.java @@ -1,9 +1,9 @@ -package com.somemore.auth.oauth.naver.service.query; +package com.somemore.global.auth.oauth.naver.service.query; -import com.somemore.auth.oauth.OAuthProvider; -import com.somemore.auth.oauth.naver.dto.response.NaverUserProfileResponseDto; -import com.somemore.auth.oauth.naver.usecase.query.CheckNaverUserUseCase; -import com.somemore.auth.oauth.usecase.ProcessOAuthUserUseCase; +import com.somemore.global.auth.oauth.OAuthProvider; +import com.somemore.global.auth.oauth.naver.dto.response.NaverUserProfileResponseDto; +import com.somemore.global.auth.oauth.naver.usecase.query.CheckNaverUserUseCase; +import com.somemore.global.auth.oauth.usecase.ProcessOAuthUserUseCase; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.security.core.Authentication; @@ -11,7 +11,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import static com.somemore.auth.oauth.naver.util.OAuthResponseConverter.convertToNaverUserProfileResponseDto; +import static com.somemore.global.auth.oauth.naver.util.OAuthResponseConverter.convertToNaverUserProfileResponseDto; @Slf4j @Service diff --git a/src/main/java/com/somemore/auth/oauth/naver/usecase/command/RegisterNaverUserUseCase.java b/src/main/java/com/somemore/global/auth/oauth/naver/usecase/command/RegisterNaverUserUseCase.java similarity index 59% rename from src/main/java/com/somemore/auth/oauth/naver/usecase/command/RegisterNaverUserUseCase.java rename to src/main/java/com/somemore/global/auth/oauth/naver/usecase/command/RegisterNaverUserUseCase.java index b87a0e797..8624afcfb 100644 --- a/src/main/java/com/somemore/auth/oauth/naver/usecase/command/RegisterNaverUserUseCase.java +++ b/src/main/java/com/somemore/global/auth/oauth/naver/usecase/command/RegisterNaverUserUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.auth.oauth.naver.usecase.command; +package com.somemore.global.auth.oauth.naver.usecase.command; public interface RegisterNaverUserUseCase { void registerNaverUser(String oAuthId); diff --git a/src/main/java/com/somemore/auth/oauth/naver/usecase/query/CheckNaverUserUseCase.java b/src/main/java/com/somemore/global/auth/oauth/naver/usecase/query/CheckNaverUserUseCase.java similarity index 58% rename from src/main/java/com/somemore/auth/oauth/naver/usecase/query/CheckNaverUserUseCase.java rename to src/main/java/com/somemore/global/auth/oauth/naver/usecase/query/CheckNaverUserUseCase.java index d9cf1e6c2..3593b181e 100644 --- a/src/main/java/com/somemore/auth/oauth/naver/usecase/query/CheckNaverUserUseCase.java +++ b/src/main/java/com/somemore/global/auth/oauth/naver/usecase/query/CheckNaverUserUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.auth.oauth.naver.usecase.query; +package com.somemore.global.auth.oauth.naver.usecase.query; public interface CheckNaverUserUseCase { boolean isNaverUserExists(String id); diff --git a/src/main/java/com/somemore/auth/oauth/naver/util/OAuthResponseConverter.java b/src/main/java/com/somemore/global/auth/oauth/naver/util/OAuthResponseConverter.java similarity index 81% rename from src/main/java/com/somemore/auth/oauth/naver/util/OAuthResponseConverter.java rename to src/main/java/com/somemore/global/auth/oauth/naver/util/OAuthResponseConverter.java index 13fe95c44..f13bdc993 100644 --- a/src/main/java/com/somemore/auth/oauth/naver/util/OAuthResponseConverter.java +++ b/src/main/java/com/somemore/global/auth/oauth/naver/util/OAuthResponseConverter.java @@ -1,7 +1,7 @@ -package com.somemore.auth.oauth.naver.util; +package com.somemore.global.auth.oauth.naver.util; import com.fasterxml.jackson.databind.ObjectMapper; -import com.somemore.auth.oauth.naver.dto.response.NaverUserProfileResponseDto; +import com.somemore.global.auth.oauth.naver.dto.response.NaverUserProfileResponseDto; import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.springframework.security.oauth2.core.user.OAuth2User; diff --git a/src/main/java/com/somemore/auth/oauth/service/CustomOAuth2UserService.java b/src/main/java/com/somemore/global/auth/oauth/service/CustomOAuth2UserService.java similarity index 89% rename from src/main/java/com/somemore/auth/oauth/service/CustomOAuth2UserService.java rename to src/main/java/com/somemore/global/auth/oauth/service/CustomOAuth2UserService.java index dc8035035..e2ef43d21 100644 --- a/src/main/java/com/somemore/auth/oauth/service/CustomOAuth2UserService.java +++ b/src/main/java/com/somemore/global/auth/oauth/service/CustomOAuth2UserService.java @@ -1,7 +1,7 @@ -package com.somemore.auth.oauth.service; +package com.somemore.global.auth.oauth.service; -import com.somemore.auth.oauth.OAuthProvider; -import com.somemore.auth.oauth.naver.service.command.NaverOAuth2UserInfoService; +import com.somemore.global.auth.oauth.OAuthProvider; +import com.somemore.global.auth.oauth.naver.service.command.NaverOAuth2UserInfoService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.security.oauth2.client.userinfo.DefaultOAuth2UserService; diff --git a/src/main/java/com/somemore/auth/oauth/usecase/ProcessOAuthUserUseCase.java b/src/main/java/com/somemore/global/auth/oauth/usecase/ProcessOAuthUserUseCase.java similarity index 84% rename from src/main/java/com/somemore/auth/oauth/usecase/ProcessOAuthUserUseCase.java rename to src/main/java/com/somemore/global/auth/oauth/usecase/ProcessOAuthUserUseCase.java index 5bbf14924..de477db59 100644 --- a/src/main/java/com/somemore/auth/oauth/usecase/ProcessOAuthUserUseCase.java +++ b/src/main/java/com/somemore/global/auth/oauth/usecase/ProcessOAuthUserUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.auth.oauth.usecase; +package com.somemore.global.auth.oauth.usecase; import jakarta.servlet.ServletException; import org.springframework.security.core.Authentication; diff --git a/src/main/java/com/somemore/auth/redirect/RedirectConfig.java b/src/main/java/com/somemore/global/auth/redirect/RedirectConfig.java similarity index 90% rename from src/main/java/com/somemore/auth/redirect/RedirectConfig.java rename to src/main/java/com/somemore/global/auth/redirect/RedirectConfig.java index 6a1aeb791..71ad903c0 100644 --- a/src/main/java/com/somemore/auth/redirect/RedirectConfig.java +++ b/src/main/java/com/somemore/global/auth/redirect/RedirectConfig.java @@ -1,4 +1,4 @@ -package com.somemore.auth.redirect; +package com.somemore.global.auth.redirect; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/src/main/java/com/somemore/auth/redirect/RedirectService.java b/src/main/java/com/somemore/global/auth/redirect/RedirectService.java similarity index 93% rename from src/main/java/com/somemore/auth/redirect/RedirectService.java rename to src/main/java/com/somemore/global/auth/redirect/RedirectService.java index aa2c25a4c..d6d48a99c 100644 --- a/src/main/java/com/somemore/auth/redirect/RedirectService.java +++ b/src/main/java/com/somemore/global/auth/redirect/RedirectService.java @@ -1,4 +1,4 @@ -package com.somemore.auth.redirect; +package com.somemore.global.auth.redirect; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; diff --git a/src/main/java/com/somemore/auth/redirect/RedirectUseCase.java b/src/main/java/com/somemore/global/auth/redirect/RedirectUseCase.java similarity index 86% rename from src/main/java/com/somemore/auth/redirect/RedirectUseCase.java rename to src/main/java/com/somemore/global/auth/redirect/RedirectUseCase.java index d215c4ce8..5b23905d3 100644 --- a/src/main/java/com/somemore/auth/redirect/RedirectUseCase.java +++ b/src/main/java/com/somemore/global/auth/redirect/RedirectUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.auth.redirect; +package com.somemore.global.auth.redirect; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; diff --git a/src/main/java/com/somemore/auth/signout/service/SignOutService.java b/src/main/java/com/somemore/global/auth/signout/service/SignOutService.java similarity index 74% rename from src/main/java/com/somemore/auth/signout/service/SignOutService.java rename to src/main/java/com/somemore/global/auth/signout/service/SignOutService.java index 015377233..0172f03b7 100644 --- a/src/main/java/com/somemore/auth/signout/service/SignOutService.java +++ b/src/main/java/com/somemore/global/auth/signout/service/SignOutService.java @@ -1,8 +1,8 @@ -package com.somemore.auth.signout.service; +package com.somemore.global.auth.signout.service; -import com.somemore.auth.cookie.CookieUseCase; -import com.somemore.auth.jwt.refresh.manager.RefreshTokenManager; -import com.somemore.auth.signout.usecase.SignOutUseCase; +import com.somemore.global.auth.cookie.CookieUseCase; +import com.somemore.global.auth.jwt.refresh.manager.RefreshTokenManager; +import com.somemore.global.auth.signout.usecase.SignOutUseCase; import jakarta.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/src/main/java/com/somemore/auth/signout/usecase/SignOutUseCase.java b/src/main/java/com/somemore/global/auth/signout/usecase/SignOutUseCase.java similarity index 75% rename from src/main/java/com/somemore/auth/signout/usecase/SignOutUseCase.java rename to src/main/java/com/somemore/global/auth/signout/usecase/SignOutUseCase.java index 6dcc4cc2d..480d9abe4 100644 --- a/src/main/java/com/somemore/auth/signout/usecase/SignOutUseCase.java +++ b/src/main/java/com/somemore/global/auth/signout/usecase/SignOutUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.auth.signout.usecase; +package com.somemore.global.auth.signout.usecase; import jakarta.servlet.http.HttpServletResponse; diff --git a/src/main/java/com/somemore/global/configure/ElasticsearchConfig.java b/src/main/java/com/somemore/global/config/ElasticsearchConfig.java similarity index 100% rename from src/main/java/com/somemore/global/configure/ElasticsearchConfig.java rename to src/main/java/com/somemore/global/config/ElasticsearchConfig.java diff --git a/src/main/java/com/somemore/global/configure/QueryDslConfig.java b/src/main/java/com/somemore/global/config/QueryDslConfig.java similarity index 92% rename from src/main/java/com/somemore/global/configure/QueryDslConfig.java rename to src/main/java/com/somemore/global/config/QueryDslConfig.java index 35c99c88f..af29a9121 100644 --- a/src/main/java/com/somemore/global/configure/QueryDslConfig.java +++ b/src/main/java/com/somemore/global/config/QueryDslConfig.java @@ -1,4 +1,4 @@ -package com.somemore.global.configure; +package com.somemore.global.config; import com.querydsl.jpa.impl.JPAQueryFactory; import jakarta.persistence.EntityManager; diff --git a/src/main/java/com/somemore/global/configure/S3Config.java b/src/main/java/com/somemore/global/config/S3Config.java similarity index 97% rename from src/main/java/com/somemore/global/configure/S3Config.java rename to src/main/java/com/somemore/global/config/S3Config.java index b58ef6755..c6daeef0c 100644 --- a/src/main/java/com/somemore/global/configure/S3Config.java +++ b/src/main/java/com/somemore/global/config/S3Config.java @@ -1,4 +1,4 @@ -package com.somemore.global.configure; +package com.somemore.global.config; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; diff --git a/src/main/java/com/somemore/global/configure/SecurityConfig.java b/src/main/java/com/somemore/global/config/SecurityConfig.java similarity index 89% rename from src/main/java/com/somemore/global/configure/SecurityConfig.java rename to src/main/java/com/somemore/global/config/SecurityConfig.java index 58d102d9b..98f60a701 100644 --- a/src/main/java/com/somemore/global/configure/SecurityConfig.java +++ b/src/main/java/com/somemore/global/config/SecurityConfig.java @@ -1,14 +1,14 @@ -package com.somemore.global.configure; +package com.somemore.global.config; import com.fasterxml.jackson.databind.ObjectMapper; -import com.somemore.auth.cookie.CookieUseCase; -import com.somemore.auth.idpw.filter.IdPwAuthFilter; -import com.somemore.auth.jwt.filter.JwtAuthFilter; -import com.somemore.auth.jwt.filter.JwtExceptionFilter; -import com.somemore.auth.jwt.usecase.GenerateTokensOnLoginUseCase; -import com.somemore.auth.oauth.handler.failure.CustomOAuthFailureHandler; -import com.somemore.auth.oauth.handler.success.CustomOAuthSuccessHandler; -import com.somemore.auth.oauth.service.CustomOAuth2UserService; +import com.somemore.global.auth.cookie.CookieUseCase; +import com.somemore.global.auth.idpw.filter.IdPwAuthFilter; +import com.somemore.global.auth.jwt.filter.JwtAuthFilter; +import com.somemore.global.auth.jwt.filter.JwtExceptionFilter; +import com.somemore.global.auth.jwt.usecase.GenerateTokensOnLoginUseCase; +import com.somemore.global.auth.oauth.handler.failure.CustomOAuthFailureHandler; +import com.somemore.global.auth.oauth.handler.success.CustomOAuthSuccessHandler; +import com.somemore.global.auth.oauth.service.CustomOAuth2UserService; import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/src/main/java/com/somemore/global/configure/SwaggerConfig.java b/src/main/java/com/somemore/global/config/SwaggerConfig.java similarity index 97% rename from src/main/java/com/somemore/global/configure/SwaggerConfig.java rename to src/main/java/com/somemore/global/config/SwaggerConfig.java index 8687599de..bf535c916 100644 --- a/src/main/java/com/somemore/global/configure/SwaggerConfig.java +++ b/src/main/java/com/somemore/global/config/SwaggerConfig.java @@ -1,4 +1,4 @@ -package com.somemore.global.configure; +package com.somemore.global.config; import io.swagger.v3.oas.annotations.OpenAPIDefinition; import io.swagger.v3.oas.annotations.servers.Server; diff --git a/src/main/java/com/somemore/global/configure/WebConfig.java b/src/main/java/com/somemore/global/config/WebConfig.java similarity index 96% rename from src/main/java/com/somemore/global/configure/WebConfig.java rename to src/main/java/com/somemore/global/config/WebConfig.java index 65ae070ec..21e923809 100644 --- a/src/main/java/com/somemore/global/configure/WebConfig.java +++ b/src/main/java/com/somemore/global/config/WebConfig.java @@ -1,4 +1,4 @@ -package com.somemore.global.configure; +package com.somemore.global.config; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.CorsRegistry; @@ -23,4 +23,4 @@ public void addCorsMappings(CorsRegistry registry) { .allowCredentials(true) .maxAge(3600); } -} \ No newline at end of file +} diff --git a/src/main/java/com/somemore/global/exception/ExceptionMessage.java b/src/main/java/com/somemore/global/exception/ExceptionMessage.java index 9631eee29..ccaf5566c 100644 --- a/src/main/java/com/somemore/global/exception/ExceptionMessage.java +++ b/src/main/java/com/somemore/global/exception/ExceptionMessage.java @@ -7,39 +7,59 @@ @RequiredArgsConstructor @Getter public enum ExceptionMessage { - + // CENTER NOT_EXISTS_CENTER("존재하지 않는 기관입니다."), + NOT_EXISTS_PREFER_ITEM("존재하지 않는 선호물품 ID 입니다"), + UNAUTHORIZED_PREFER_ITEM("해당 선호물품에 대한 권한이 없습니다."), + + // VOLUNTEER + NOT_EXISTS_VOLUNTEER("존재하지 않는 봉사자입니다."), + UNAUTHORIZED_VOLUNTEER_DETAIL("해당 봉사자의 상세 정보 조회 권한이 없습니다."), + + // COMMUNITY NOT_EXISTS_COMMUNITY_BOARD("존재하지 않는 게시글입니다."), UNAUTHORIZED_COMMUNITY_BOARD("해당 게시글에 권한이 없습니다."), NOT_EXISTS_COMMUNITY_COMMENT("존재하지 않는 댓글 입니다."), UNAUTHORIZED_COMMUNITY_COMMENT("해당 댓글에 권한이 없습니다."), + + // LOCATION NOT_EXISTS_LOCATION("존재하지 않는 위치 ID 입니다."), + + // RECRUIT BOARD NOT_EXISTS_RECRUIT_BOARD("존재하지 않는 봉사 모집글입니다."), UNAUTHORIZED_RECRUIT_BOARD("해당 봉사 모집글에 권한이 없습니다."), + + // IMAGE UPLOAD_FAILED("파일 업로드에 실패했습니다."), INVALID_FILE_TYPE("지원하지 않는 파일 형식입니다."), FILE_SIZE_EXCEEDED("파일 크기가 허용된 한도를 초과했습니다."), EMPTY_FILE("파일이 존재하지 않습니다."), INSTANTIATION_NOT_ALLOWED("인스턴스화 할 수 없는 클래스 입니다."), - NOT_EXISTS_VOLUNTEER("존재하지 않는 봉사자입니다."), - UNAUTHORIZED_VOLUNTEER_DETAIL("해당 봉사자의 상세 정보 조회 권한이 없습니다."), + + // INTEREST CENTER CANNOT_CANCEL_DELETED_INTEREST_CENTER("이미 삭제된 관심 기관은 취소할 수 없습니다."), DUPLICATE_INTEREST_CENTER("이미 관심 표시한 기관입니다."), + + // VOLUNTEER APPLY NOT_EXISTS_VOLUNTEER_APPLY("존재하지 않는 봉사 활동 지원입니다."), - REVIEW_ALREADY_EXISTS("이미 작성한 리뷰가 존재합니다."), - REVIEW_RESTRICTED_TO_ATTENDED("리뷰는 참석한 봉사에 한해서만 작성할 수 있습니다."), - NOT_EXISTS_REVIEW("존재하지 않는 리뷰입니다."), RECRUITMENT_NOT_OPEN("현재 모집 진행 중이 아닙니다."), DUPLICATE_APPLICATION("이미 신청한 봉사 모집 공고입니다."), UNAUTHORIZED_VOLUNTEER_APPLY("해당 지원에 권한이 없습니다."), RECRUIT_BOARD_ALREADY_COMPLETED("이미 종료된 봉사 활동입니다."), - NOT_EXISTS_NOTIFICATION("존재하지 않는 알림입니다."), - UNAUTHORIZED_NOTIFICATION("해당 알림에 권한이 없습니다."), VOLUNTEER_APPLY_LIST_MISMATCH("봉사 지원 목록과 요청된 봉사 지원 목록이 일치하지 않습니다."), RECRUIT_BOARD_ID_MISMATCH("모든 봉사 신청이 동일한 모집글 ID를 가져야 합니다."), + + // REVIEW + REVIEW_ALREADY_EXISTS("이미 작성한 리뷰가 존재합니다."), + REVIEW_RESTRICTED_TO_ATTENDED("리뷰는 참석한 봉사에 한해서만 작성할 수 있습니다."), + NOT_EXISTS_REVIEW("존재하지 않는 리뷰입니다."), + + // NOTIFICATION + NOT_EXISTS_NOTIFICATION("존재하지 않는 알림입니다."), + UNAUTHORIZED_NOTIFICATION("해당 알림에 권한이 없습니다."), + + // NOTE NOT_EXISTS_NOTE("존재하지 않는 쪽지입니다."), - NOT_EXISTS_PREFER_ITEM("존재하지 않는 선호물품 Id입니다"), - UNAUTHORIZED_PREFER_ITEM("해당 선호물품에 대한 권한이 없습니다.") ; private final String message; diff --git a/src/main/java/com/somemore/global/handler/GlobalExceptionHandler.java b/src/main/java/com/somemore/global/exception/handler/GlobalExceptionHandler.java similarity index 98% rename from src/main/java/com/somemore/global/handler/GlobalExceptionHandler.java rename to src/main/java/com/somemore/global/exception/handler/GlobalExceptionHandler.java index e727265f6..97150c26a 100644 --- a/src/main/java/com/somemore/global/handler/GlobalExceptionHandler.java +++ b/src/main/java/com/somemore/global/exception/handler/GlobalExceptionHandler.java @@ -1,4 +1,4 @@ -package com.somemore.global.handler; +package com.somemore.global.exception.handler; import com.somemore.global.exception.BadRequestException; import com.somemore.global.exception.DuplicateException; diff --git a/src/main/java/com/somemore/imageupload/converter/MultipartJackson2HttpMessageConverter.java b/src/main/java/com/somemore/global/imageupload/converter/MultipartJackson2HttpMessageConverter.java similarity index 94% rename from src/main/java/com/somemore/imageupload/converter/MultipartJackson2HttpMessageConverter.java rename to src/main/java/com/somemore/global/imageupload/converter/MultipartJackson2HttpMessageConverter.java index 6f403dd73..2472cfef8 100644 --- a/src/main/java/com/somemore/imageupload/converter/MultipartJackson2HttpMessageConverter.java +++ b/src/main/java/com/somemore/global/imageupload/converter/MultipartJackson2HttpMessageConverter.java @@ -1,4 +1,4 @@ -package com.somemore.imageupload.converter; +package com.somemore.global.imageupload.converter; import com.fasterxml.jackson.databind.ObjectMapper; import java.lang.reflect.Type; diff --git a/src/main/java/com/somemore/imageupload/dto/ImageUploadRequestDto.java b/src/main/java/com/somemore/global/imageupload/dto/ImageUploadRequestDto.java similarity index 74% rename from src/main/java/com/somemore/imageupload/dto/ImageUploadRequestDto.java rename to src/main/java/com/somemore/global/imageupload/dto/ImageUploadRequestDto.java index 8cc01de84..f8295a328 100644 --- a/src/main/java/com/somemore/imageupload/dto/ImageUploadRequestDto.java +++ b/src/main/java/com/somemore/global/imageupload/dto/ImageUploadRequestDto.java @@ -1,4 +1,4 @@ -package com.somemore.imageupload.dto; +package com.somemore.global.imageupload.dto; import org.springframework.web.multipart.MultipartFile; diff --git a/src/main/java/com/somemore/imageupload/service/ImageUploadService.java b/src/main/java/com/somemore/global/imageupload/service/ImageUploadService.java similarity index 88% rename from src/main/java/com/somemore/imageupload/service/ImageUploadService.java rename to src/main/java/com/somemore/global/imageupload/service/ImageUploadService.java index f4ba47882..1352cc65f 100644 --- a/src/main/java/com/somemore/imageupload/service/ImageUploadService.java +++ b/src/main/java/com/somemore/global/imageupload/service/ImageUploadService.java @@ -1,10 +1,10 @@ -package com.somemore.imageupload.service; +package com.somemore.global.imageupload.service; import com.somemore.global.exception.ImageUploadException; -import com.somemore.imageupload.dto.ImageUploadRequestDto; -import com.somemore.imageupload.usecase.ImageUploadUseCase; -import com.somemore.imageupload.util.ImageUploadUtils; -import com.somemore.imageupload.validator.ImageUploadValidator; +import com.somemore.global.imageupload.dto.ImageUploadRequestDto; +import com.somemore.global.imageupload.util.ImageUploadUtils; +import com.somemore.global.imageupload.validator.ImageUploadValidator; +import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import jakarta.annotation.PostConstruct; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Value; diff --git a/src/main/java/com/somemore/global/imageupload/usecase/ImageUploadUseCase.java b/src/main/java/com/somemore/global/imageupload/usecase/ImageUploadUseCase.java new file mode 100644 index 000000000..4b1ee30c9 --- /dev/null +++ b/src/main/java/com/somemore/global/imageupload/usecase/ImageUploadUseCase.java @@ -0,0 +1,7 @@ +package com.somemore.global.imageupload.usecase; + +import com.somemore.global.imageupload.dto.ImageUploadRequestDto; + +public interface ImageUploadUseCase { + String uploadImage(ImageUploadRequestDto requestDto); +} diff --git a/src/main/java/com/somemore/imageupload/util/ImageUploadUtils.java b/src/main/java/com/somemore/global/imageupload/util/ImageUploadUtils.java similarity index 94% rename from src/main/java/com/somemore/imageupload/util/ImageUploadUtils.java rename to src/main/java/com/somemore/global/imageupload/util/ImageUploadUtils.java index c72e2c5b0..21feb53f8 100644 --- a/src/main/java/com/somemore/imageupload/util/ImageUploadUtils.java +++ b/src/main/java/com/somemore/global/imageupload/util/ImageUploadUtils.java @@ -1,4 +1,4 @@ -package com.somemore.imageupload.util; +package com.somemore.global.imageupload.util; import java.util.UUID; diff --git a/src/main/java/com/somemore/imageupload/validator/DefaultImageUploadValidator.java b/src/main/java/com/somemore/global/imageupload/validator/DefaultImageUploadValidator.java similarity index 96% rename from src/main/java/com/somemore/imageupload/validator/DefaultImageUploadValidator.java rename to src/main/java/com/somemore/global/imageupload/validator/DefaultImageUploadValidator.java index 75c610838..cef7eb57b 100644 --- a/src/main/java/com/somemore/imageupload/validator/DefaultImageUploadValidator.java +++ b/src/main/java/com/somemore/global/imageupload/validator/DefaultImageUploadValidator.java @@ -1,4 +1,4 @@ -package com.somemore.imageupload.validator; +package com.somemore.global.imageupload.validator; import com.somemore.global.exception.ImageUploadException; import org.springframework.stereotype.Component; diff --git a/src/main/java/com/somemore/imageupload/validator/ImageUploadValidator.java b/src/main/java/com/somemore/global/imageupload/validator/ImageUploadValidator.java similarity index 82% rename from src/main/java/com/somemore/imageupload/validator/ImageUploadValidator.java rename to src/main/java/com/somemore/global/imageupload/validator/ImageUploadValidator.java index 1d97dcbf1..928727d6f 100644 --- a/src/main/java/com/somemore/imageupload/validator/ImageUploadValidator.java +++ b/src/main/java/com/somemore/global/imageupload/validator/ImageUploadValidator.java @@ -1,4 +1,4 @@ -package com.somemore.imageupload.validator; +package com.somemore.global.imageupload.validator; import org.springframework.web.multipart.MultipartFile; diff --git a/src/main/java/com/somemore/sse/controller/SseController.java b/src/main/java/com/somemore/global/sse/controller/SseController.java similarity index 85% rename from src/main/java/com/somemore/sse/controller/SseController.java rename to src/main/java/com/somemore/global/sse/controller/SseController.java index 9c1579f8f..03b6db7c7 100644 --- a/src/main/java/com/somemore/sse/controller/SseController.java +++ b/src/main/java/com/somemore/global/sse/controller/SseController.java @@ -1,7 +1,7 @@ -package com.somemore.sse.controller; +package com.somemore.global.sse.controller; -import com.somemore.auth.annotation.CurrentUser; -import com.somemore.sse.usecase.SseUseCase; +import com.somemore.global.auth.annotation.CurrentUser; +import com.somemore.global.sse.usecase.SseUseCase; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.springframework.security.access.annotation.Secured; diff --git a/src/main/java/com/somemore/sse/domain/SseEvent.java b/src/main/java/com/somemore/global/sse/domain/SseEvent.java similarity index 91% rename from src/main/java/com/somemore/sse/domain/SseEvent.java rename to src/main/java/com/somemore/global/sse/domain/SseEvent.java index e24a34b48..3679ffa06 100644 --- a/src/main/java/com/somemore/sse/domain/SseEvent.java +++ b/src/main/java/com/somemore/global/sse/domain/SseEvent.java @@ -1,4 +1,4 @@ -package com.somemore.sse.domain; +package com.somemore.global.sse.domain; import lombok.Builder; import lombok.Getter; diff --git a/src/main/java/com/somemore/sse/domain/SseEventType.java b/src/main/java/com/somemore/global/sse/domain/SseEventType.java similarity index 85% rename from src/main/java/com/somemore/sse/domain/SseEventType.java rename to src/main/java/com/somemore/global/sse/domain/SseEventType.java index 8a6cd9620..dedd1c1a3 100644 --- a/src/main/java/com/somemore/sse/domain/SseEventType.java +++ b/src/main/java/com/somemore/global/sse/domain/SseEventType.java @@ -1,4 +1,4 @@ -package com.somemore.sse.domain; +package com.somemore.global.sse.domain; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/sse/domain/SseInitMessage.java b/src/main/java/com/somemore/global/sse/domain/SseInitMessage.java similarity index 93% rename from src/main/java/com/somemore/sse/domain/SseInitMessage.java rename to src/main/java/com/somemore/global/sse/domain/SseInitMessage.java index e6c63ac6b..de1712445 100644 --- a/src/main/java/com/somemore/sse/domain/SseInitMessage.java +++ b/src/main/java/com/somemore/global/sse/domain/SseInitMessage.java @@ -1,4 +1,4 @@ -package com.somemore.sse.domain; +package com.somemore.global.sse.domain; import java.time.LocalDateTime; import java.util.UUID; diff --git a/src/main/java/com/somemore/sse/repository/EmitterRepository.java b/src/main/java/com/somemore/global/sse/repository/EmitterRepository.java similarity index 89% rename from src/main/java/com/somemore/sse/repository/EmitterRepository.java rename to src/main/java/com/somemore/global/sse/repository/EmitterRepository.java index e0d712998..af712de3d 100644 --- a/src/main/java/com/somemore/sse/repository/EmitterRepository.java +++ b/src/main/java/com/somemore/global/sse/repository/EmitterRepository.java @@ -1,4 +1,4 @@ -package com.somemore.sse.repository; +package com.somemore.global.sse.repository; import java.util.Map; import java.util.UUID; diff --git a/src/main/java/com/somemore/sse/repository/EmitterRepositoryImpl.java b/src/main/java/com/somemore/global/sse/repository/EmitterRepositoryImpl.java similarity index 96% rename from src/main/java/com/somemore/sse/repository/EmitterRepositoryImpl.java rename to src/main/java/com/somemore/global/sse/repository/EmitterRepositoryImpl.java index b3b925d47..f4253563c 100644 --- a/src/main/java/com/somemore/sse/repository/EmitterRepositoryImpl.java +++ b/src/main/java/com/somemore/global/sse/repository/EmitterRepositoryImpl.java @@ -1,4 +1,4 @@ -package com.somemore.sse.repository; +package com.somemore.global.sse.repository; import org.springframework.stereotype.Repository; import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; diff --git a/src/main/java/com/somemore/global/sse/sender/SseSender.java b/src/main/java/com/somemore/global/sse/sender/SseSender.java new file mode 100644 index 000000000..36b8d14d6 --- /dev/null +++ b/src/main/java/com/somemore/global/sse/sender/SseSender.java @@ -0,0 +1,7 @@ +package com.somemore.global.sse.sender; + +import com.somemore.global.sse.domain.SseEvent; + +public interface SseSender { + void send(SseEvent sseEvent); +} diff --git a/src/main/java/com/somemore/sse/sender/SseSenderImpl.java b/src/main/java/com/somemore/global/sse/sender/SseSenderImpl.java similarity index 89% rename from src/main/java/com/somemore/sse/sender/SseSenderImpl.java rename to src/main/java/com/somemore/global/sse/sender/SseSenderImpl.java index d7665af10..da2e90719 100644 --- a/src/main/java/com/somemore/sse/sender/SseSenderImpl.java +++ b/src/main/java/com/somemore/global/sse/sender/SseSenderImpl.java @@ -1,7 +1,7 @@ -package com.somemore.sse.sender; +package com.somemore.global.sse.sender; -import com.somemore.sse.repository.EmitterRepository; -import com.somemore.sse.domain.SseEvent; +import com.somemore.global.sse.domain.SseEvent; +import com.somemore.global.sse.repository.EmitterRepository; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/somemore/sse/service/SseService.java b/src/main/java/com/somemore/global/sse/service/SseService.java similarity index 72% rename from src/main/java/com/somemore/sse/service/SseService.java rename to src/main/java/com/somemore/global/sse/service/SseService.java index b572befbf..e3870f675 100644 --- a/src/main/java/com/somemore/sse/service/SseService.java +++ b/src/main/java/com/somemore/global/sse/service/SseService.java @@ -1,10 +1,10 @@ -package com.somemore.sse.service; +package com.somemore.global.sse.service; -import com.somemore.sse.domain.SseEvent; -import com.somemore.sse.domain.SseInitMessage; -import com.somemore.sse.sender.SseSender; -import com.somemore.sse.subscriber.SseSubscriptionManager; -import com.somemore.sse.usecase.SseUseCase; +import com.somemore.global.sse.domain.SseEvent; +import com.somemore.global.sse.domain.SseInitMessage; +import com.somemore.global.sse.sender.SseSender; +import com.somemore.global.sse.subscriber.SseSubscriptionManager; +import com.somemore.global.sse.usecase.SseUseCase; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/somemore/sse/subscriber/SseSubscriptionManager.java b/src/main/java/com/somemore/global/sse/subscriber/SseSubscriptionManager.java similarity index 80% rename from src/main/java/com/somemore/sse/subscriber/SseSubscriptionManager.java rename to src/main/java/com/somemore/global/sse/subscriber/SseSubscriptionManager.java index 6858b9670..bb8a2a156 100644 --- a/src/main/java/com/somemore/sse/subscriber/SseSubscriptionManager.java +++ b/src/main/java/com/somemore/global/sse/subscriber/SseSubscriptionManager.java @@ -1,4 +1,4 @@ -package com.somemore.sse.subscriber; +package com.somemore.global.sse.subscriber; import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; diff --git a/src/main/java/com/somemore/sse/subscriber/SseSubscriptionManagerImpl.java b/src/main/java/com/somemore/global/sse/subscriber/SseSubscriptionManagerImpl.java similarity index 91% rename from src/main/java/com/somemore/sse/subscriber/SseSubscriptionManagerImpl.java rename to src/main/java/com/somemore/global/sse/subscriber/SseSubscriptionManagerImpl.java index 3cd7a2ba5..b99b84787 100644 --- a/src/main/java/com/somemore/sse/subscriber/SseSubscriptionManagerImpl.java +++ b/src/main/java/com/somemore/global/sse/subscriber/SseSubscriptionManagerImpl.java @@ -1,6 +1,6 @@ -package com.somemore.sse.subscriber; +package com.somemore.global.sse.subscriber; -import com.somemore.sse.repository.EmitterRepository; +import com.somemore.global.sse.repository.EmitterRepository; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/somemore/sse/usecase/SseUseCase.java b/src/main/java/com/somemore/global/sse/usecase/SseUseCase.java similarity index 70% rename from src/main/java/com/somemore/sse/usecase/SseUseCase.java rename to src/main/java/com/somemore/global/sse/usecase/SseUseCase.java index 84e27215d..e320c0062 100644 --- a/src/main/java/com/somemore/sse/usecase/SseUseCase.java +++ b/src/main/java/com/somemore/global/sse/usecase/SseUseCase.java @@ -1,6 +1,6 @@ -package com.somemore.sse.usecase; +package com.somemore.global.sse.usecase; -import com.somemore.sse.domain.SseEvent; +import com.somemore.global.sse.domain.SseEvent; import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; import java.util.UUID; diff --git a/src/main/java/com/somemore/imageupload/usecase/ImageUploadUseCase.java b/src/main/java/com/somemore/imageupload/usecase/ImageUploadUseCase.java deleted file mode 100644 index acfd3ed2c..000000000 --- a/src/main/java/com/somemore/imageupload/usecase/ImageUploadUseCase.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.somemore.imageupload.usecase; - -import com.somemore.imageupload.dto.ImageUploadRequestDto; - -public interface ImageUploadUseCase { - String uploadImage(ImageUploadRequestDto requestDto); -} diff --git a/src/main/java/com/somemore/interestcenter/controller/InterestCenterCommandApiController.java b/src/main/java/com/somemore/interestcenter/controller/InterestCenterCommandApiController.java index 9f00ef66e..5fd1ff6f0 100644 --- a/src/main/java/com/somemore/interestcenter/controller/InterestCenterCommandApiController.java +++ b/src/main/java/com/somemore/interestcenter/controller/InterestCenterCommandApiController.java @@ -1,6 +1,6 @@ package com.somemore.interestcenter.controller; -import com.somemore.auth.annotation.CurrentUser; +import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; import com.somemore.interestcenter.dto.request.RegisterInterestCenterRequestDto; import com.somemore.interestcenter.dto.response.RegisterInterestCenterResponseDto; diff --git a/src/main/java/com/somemore/interestcenter/controller/InterestCenterQueryApiController.java b/src/main/java/com/somemore/interestcenter/controller/InterestCenterQueryApiController.java index f039057e7..c58b7e394 100644 --- a/src/main/java/com/somemore/interestcenter/controller/InterestCenterQueryApiController.java +++ b/src/main/java/com/somemore/interestcenter/controller/InterestCenterQueryApiController.java @@ -1,6 +1,6 @@ package com.somemore.interestcenter.controller; -import com.somemore.auth.annotation.CurrentUser; +import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; import com.somemore.interestcenter.dto.response.InterestCentersResponseDto; import com.somemore.interestcenter.usecase.InterestCenterQueryUseCase; diff --git a/src/main/java/com/somemore/note/controller/NoteCommandApiController.java b/src/main/java/com/somemore/note/controller/NoteCommandApiController.java index 6e87a582c..39d4c5791 100644 --- a/src/main/java/com/somemore/note/controller/NoteCommandApiController.java +++ b/src/main/java/com/somemore/note/controller/NoteCommandApiController.java @@ -1,6 +1,6 @@ package com.somemore.note.controller; -import com.somemore.auth.annotation.CurrentUser; +import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; import com.somemore.note.dto.SendNoteToCenterRequestDto; import com.somemore.note.dto.SendNoteToVolunteerRequestDto; diff --git a/src/main/java/com/somemore/note/controller/NoteQueryApiController.java b/src/main/java/com/somemore/note/controller/NoteQueryApiController.java index b961a404c..04c055d09 100644 --- a/src/main/java/com/somemore/note/controller/NoteQueryApiController.java +++ b/src/main/java/com/somemore/note/controller/NoteQueryApiController.java @@ -1,6 +1,6 @@ package com.somemore.note.controller; -import com.somemore.auth.annotation.CurrentUser; +import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; import com.somemore.note.repository.mapper.NoteDetailViewForCenter; import com.somemore.note.repository.mapper.NoteDetailViewForVolunteer; diff --git a/src/main/java/com/somemore/notification/controller/NotificationCommandController.java b/src/main/java/com/somemore/notification/controller/NotificationCommandController.java index 7f60fe2e1..3d90b55bd 100644 --- a/src/main/java/com/somemore/notification/controller/NotificationCommandController.java +++ b/src/main/java/com/somemore/notification/controller/NotificationCommandController.java @@ -1,6 +1,6 @@ package com.somemore.notification.controller; -import com.somemore.auth.annotation.CurrentUser; +import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; import com.somemore.notification.dto.NotificationIdsRequestDto; import com.somemore.notification.usecase.NotificationCommandUseCase; diff --git a/src/main/java/com/somemore/notification/controller/NotificationQueryController.java b/src/main/java/com/somemore/notification/controller/NotificationQueryController.java index 7d958e13c..70c935fe0 100644 --- a/src/main/java/com/somemore/notification/controller/NotificationQueryController.java +++ b/src/main/java/com/somemore/notification/controller/NotificationQueryController.java @@ -1,6 +1,6 @@ package com.somemore.notification.controller; -import com.somemore.auth.annotation.CurrentUser; +import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; import com.somemore.notification.dto.NotificationResponseDto; import com.somemore.notification.usecase.NotificationQueryUseCase; diff --git a/src/main/java/com/somemore/notification/event/converter/NotificationMessageConverter.java b/src/main/java/com/somemore/notification/event/converter/NotificationMessageConverter.java index 5253efa74..722ee5f30 100644 --- a/src/main/java/com/somemore/notification/event/converter/NotificationMessageConverter.java +++ b/src/main/java/com/somemore/notification/event/converter/NotificationMessageConverter.java @@ -4,7 +4,7 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.somemore.community.event.CommentAddedEvent; -import com.somemore.facade.event.VolunteerReviewRequestEvent; +import com.somemore.volunteerapply.event.VolunteerReviewRequestEvent; import com.somemore.interestcenter.event.domain.InterestCenterCreateRecruitBoardEvent; import com.somemore.notification.domain.Notification; import com.somemore.notification.domain.NotificationSubType; diff --git a/src/main/java/com/somemore/notification/event/handler/NotificationHandlerImpl.java b/src/main/java/com/somemore/notification/event/handler/NotificationHandlerImpl.java index f2abb6d9f..47121b734 100644 --- a/src/main/java/com/somemore/notification/event/handler/NotificationHandlerImpl.java +++ b/src/main/java/com/somemore/notification/event/handler/NotificationHandlerImpl.java @@ -3,9 +3,9 @@ import com.somemore.notification.domain.Notification; import com.somemore.notification.dto.NotificationResponseDto; import com.somemore.notification.repository.NotificationRepository; -import com.somemore.sse.domain.SseEvent; -import com.somemore.sse.domain.SseEventType; -import com.somemore.sse.usecase.SseUseCase; +import com.somemore.global.sse.domain.SseEvent; +import com.somemore.global.sse.domain.SseEventType; +import com.somemore.global.sse.usecase.SseUseCase; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; diff --git a/src/main/java/com/somemore/recruitboard/controller/RecruitBoardCommandApiController.java b/src/main/java/com/somemore/recruitboard/controller/RecruitBoardCommandApiController.java index 2f1804c1c..2d2f2ef49 100644 --- a/src/main/java/com/somemore/recruitboard/controller/RecruitBoardCommandApiController.java +++ b/src/main/java/com/somemore/recruitboard/controller/RecruitBoardCommandApiController.java @@ -3,10 +3,10 @@ import static org.springframework.http.MediaType.MULTIPART_FORM_DATA_VALUE; -import com.somemore.auth.annotation.CurrentUser; +import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; -import com.somemore.imageupload.dto.ImageUploadRequestDto; -import com.somemore.imageupload.usecase.ImageUploadUseCase; +import com.somemore.global.imageupload.dto.ImageUploadRequestDto; +import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import com.somemore.recruitboard.dto.request.RecruitBoardCreateRequestDto; import com.somemore.recruitboard.dto.request.RecruitBoardLocationUpdateRequestDto; import com.somemore.recruitboard.dto.request.RecruitBoardStatusUpdateRequestDto; diff --git a/src/main/java/com/somemore/review/controller/ReviewCommandApiController.java b/src/main/java/com/somemore/review/controller/ReviewCommandApiController.java index 4735c1093..1efbcb8f9 100644 --- a/src/main/java/com/somemore/review/controller/ReviewCommandApiController.java +++ b/src/main/java/com/somemore/review/controller/ReviewCommandApiController.java @@ -2,10 +2,10 @@ import static org.springframework.http.MediaType.MULTIPART_FORM_DATA_VALUE; -import com.somemore.auth.annotation.CurrentUser; +import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; -import com.somemore.imageupload.dto.ImageUploadRequestDto; -import com.somemore.imageupload.usecase.ImageUploadUseCase; +import com.somemore.global.imageupload.dto.ImageUploadRequestDto; +import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import com.somemore.review.dto.request.ReviewCreateRequestDto; import com.somemore.review.usecase.CreateReviewUseCase; import io.swagger.v3.oas.annotations.Operation; diff --git a/src/main/java/com/somemore/sse/sender/SseSender.java b/src/main/java/com/somemore/sse/sender/SseSender.java deleted file mode 100644 index 9b96f9da9..000000000 --- a/src/main/java/com/somemore/sse/sender/SseSender.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.somemore.sse.sender; - -import com.somemore.sse.domain.SseEvent; - -public interface SseSender { - void send(SseEvent sseEvent); -} diff --git a/src/main/java/com/somemore/volunteer/controller/VolunteerProfileCommandController.java b/src/main/java/com/somemore/volunteer/controller/VolunteerProfileCommandController.java index b6ae1f497..772e5701c 100644 --- a/src/main/java/com/somemore/volunteer/controller/VolunteerProfileCommandController.java +++ b/src/main/java/com/somemore/volunteer/controller/VolunteerProfileCommandController.java @@ -2,10 +2,10 @@ import static org.springframework.http.MediaType.MULTIPART_FORM_DATA_VALUE; -import com.somemore.auth.annotation.CurrentUser; +import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; -import com.somemore.imageupload.dto.ImageUploadRequestDto; -import com.somemore.imageupload.usecase.ImageUploadUseCase; +import com.somemore.global.imageupload.dto.ImageUploadRequestDto; +import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import com.somemore.volunteer.dto.request.VolunteerProfileUpdateRequestDto; import com.somemore.volunteer.usecase.UpdateVolunteerProfileUseCase; import io.swagger.v3.oas.annotations.Operation; diff --git a/src/main/java/com/somemore/volunteer/controller/VolunteerProfileQueryController.java b/src/main/java/com/somemore/volunteer/controller/VolunteerProfileQueryController.java index 54f1f7c60..33f1290a1 100644 --- a/src/main/java/com/somemore/volunteer/controller/VolunteerProfileQueryController.java +++ b/src/main/java/com/somemore/volunteer/controller/VolunteerProfileQueryController.java @@ -1,6 +1,6 @@ package com.somemore.volunteer.controller; -import com.somemore.auth.annotation.CurrentUser; +import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; import com.somemore.volunteer.dto.response.VolunteerProfileResponseDto; import com.somemore.volunteer.usecase.VolunteerQueryUseCase; diff --git a/src/main/java/com/somemore/volunteer/controller/VolunteerSignController.java b/src/main/java/com/somemore/volunteer/controller/VolunteerSignController.java index e6f93fcdf..8146f1446 100644 --- a/src/main/java/com/somemore/volunteer/controller/VolunteerSignController.java +++ b/src/main/java/com/somemore/volunteer/controller/VolunteerSignController.java @@ -2,7 +2,7 @@ import com.somemore.global.common.response.ApiResponse; import com.somemore.global.exception.BadRequestException; -import com.somemore.auth.signout.usecase.SignOutUseCase; +import com.somemore.global.auth.signout.usecase.SignOutUseCase; import com.somemore.volunteer.usecase.GenerateOAuthUrlUseCase; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/src/main/java/com/somemore/volunteer/domain/Volunteer.java b/src/main/java/com/somemore/volunteer/domain/Volunteer.java index ec596d446..1d4fc51f5 100644 --- a/src/main/java/com/somemore/volunteer/domain/Volunteer.java +++ b/src/main/java/com/somemore/volunteer/domain/Volunteer.java @@ -1,6 +1,6 @@ package com.somemore.volunteer.domain; -import com.somemore.auth.oauth.OAuthProvider; +import com.somemore.global.auth.oauth.OAuthProvider; import com.somemore.global.common.entity.BaseEntity; import com.somemore.volunteer.dto.request.VolunteerProfileUpdateRequestDto; import jakarta.persistence.*; diff --git a/src/main/java/com/somemore/volunteer/dto/request/VolunteerRegisterRequestDto.java b/src/main/java/com/somemore/volunteer/dto/request/VolunteerRegisterRequestDto.java index 67dcf7a96..5d1960d27 100644 --- a/src/main/java/com/somemore/volunteer/dto/request/VolunteerRegisterRequestDto.java +++ b/src/main/java/com/somemore/volunteer/dto/request/VolunteerRegisterRequestDto.java @@ -1,6 +1,6 @@ package com.somemore.volunteer.dto.request; -import com.somemore.auth.oauth.OAuthProvider; +import com.somemore.global.auth.oauth.OAuthProvider; public record VolunteerRegisterRequestDto( OAuthProvider oAuthProvider, diff --git a/src/main/java/com/somemore/volunteer/service/VolunteerQueryService.java b/src/main/java/com/somemore/volunteer/service/VolunteerQueryService.java index d29a682dc..6e6c6409c 100644 --- a/src/main/java/com/somemore/volunteer/service/VolunteerQueryService.java +++ b/src/main/java/com/somemore/volunteer/service/VolunteerQueryService.java @@ -2,7 +2,6 @@ import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_VOLUNTEER; -import com.somemore.facade.validator.VolunteerDetailAccessValidator; import com.somemore.global.exception.BadRequestException; import com.somemore.volunteer.domain.Volunteer; import com.somemore.volunteer.domain.VolunteerDetail; @@ -13,6 +12,7 @@ import com.somemore.volunteer.repository.mapper.VolunteerOverviewForRankingByHours; import com.somemore.volunteer.repository.mapper.VolunteerSimpleInfo; import com.somemore.volunteer.usecase.VolunteerQueryUseCase; +import com.somemore.volunteer.validator.VolunteerDetailAccessValidator; import java.util.List; import java.util.UUID; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/com/somemore/facade/validator/VolunteerDetailAccessValidator.java b/src/main/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidator.java similarity index 77% rename from src/main/java/com/somemore/facade/validator/VolunteerDetailAccessValidator.java rename to src/main/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidator.java index 9d7a5601f..83a183bee 100644 --- a/src/main/java/com/somemore/facade/validator/VolunteerDetailAccessValidator.java +++ b/src/main/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidator.java @@ -1,4 +1,4 @@ -package com.somemore.facade.validator; +package com.somemore.volunteer.validator; import java.util.UUID; diff --git a/src/main/java/com/somemore/facade/validator/VolunteerDetailAccessValidatorImpl.java b/src/main/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidatorImpl.java similarity index 97% rename from src/main/java/com/somemore/facade/validator/VolunteerDetailAccessValidatorImpl.java rename to src/main/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidatorImpl.java index 05e66075b..50c948a9b 100644 --- a/src/main/java/com/somemore/facade/validator/VolunteerDetailAccessValidatorImpl.java +++ b/src/main/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidatorImpl.java @@ -1,4 +1,4 @@ -package com.somemore.facade.validator; +package com.somemore.volunteer.validator; import com.somemore.global.exception.BadRequestException; import com.somemore.recruitboard.usecase.query.RecruitBoardQueryUseCase; @@ -34,4 +34,4 @@ public void validateByCenterId(UUID centerId, UUID targetVolunteerId) { throw new BadRequestException(UNAUTHORIZED_VOLUNTEER_DETAIL); } -} \ No newline at end of file +} diff --git a/src/main/java/com/somemore/volunteerapply/controller/CenterVolunteerApplyCommandApiController.java b/src/main/java/com/somemore/volunteerapply/controller/CenterVolunteerApplyCommandApiController.java index 3f04b4af3..9b44df854 100644 --- a/src/main/java/com/somemore/volunteerapply/controller/CenterVolunteerApplyCommandApiController.java +++ b/src/main/java/com/somemore/volunteerapply/controller/CenterVolunteerApplyCommandApiController.java @@ -1,7 +1,7 @@ package com.somemore.volunteerapply.controller; -import com.somemore.auth.annotation.CurrentUser; -import com.somemore.facade.volunteerapply.SettleVolunteerApplyFacadeUseCase; +import com.somemore.global.auth.annotation.CurrentUser; +import com.somemore.volunteerapply.usecase.SettleVolunteerApplyFacadeUseCase; import com.somemore.global.common.response.ApiResponse; import com.somemore.volunteerapply.dto.request.VolunteerApplySettleRequestDto; import com.somemore.volunteerapply.usecase.ApproveVolunteerApplyUseCase; diff --git a/src/main/java/com/somemore/volunteerapply/controller/VolunteerApplyCommandApiController.java b/src/main/java/com/somemore/volunteerapply/controller/VolunteerApplyCommandApiController.java index af9304e3d..b3e139da8 100644 --- a/src/main/java/com/somemore/volunteerapply/controller/VolunteerApplyCommandApiController.java +++ b/src/main/java/com/somemore/volunteerapply/controller/VolunteerApplyCommandApiController.java @@ -1,6 +1,6 @@ package com.somemore.volunteerapply.controller; -import com.somemore.auth.annotation.CurrentUser; +import com.somemore.global.auth.annotation.CurrentUser; import com.somemore.global.common.response.ApiResponse; import com.somemore.volunteerapply.dto.request.VolunteerApplyCreateRequestDto; import com.somemore.volunteerapply.usecase.ApplyVolunteerApplyUseCase; diff --git a/src/main/java/com/somemore/volunteerapply/controller/VolunteerApplyQueryApiController.java b/src/main/java/com/somemore/volunteerapply/controller/VolunteerApplyQueryApiController.java index d302bd216..19d8d4ccb 100644 --- a/src/main/java/com/somemore/volunteerapply/controller/VolunteerApplyQueryApiController.java +++ b/src/main/java/com/somemore/volunteerapply/controller/VolunteerApplyQueryApiController.java @@ -2,8 +2,8 @@ import static org.springframework.data.domain.Sort.Direction.DESC; -import com.somemore.auth.annotation.CurrentUser; -import com.somemore.facade.volunteerapply.VolunteerApplyQueryFacadeUseCase; +import com.somemore.global.auth.annotation.CurrentUser; +import com.somemore.volunteerapply.usecase.VolunteerApplyQueryFacadeUseCase; import com.somemore.global.common.response.ApiResponse; import com.somemore.global.exception.BadRequestException; import com.somemore.volunteerapply.domain.ApplyStatus; diff --git a/src/main/java/com/somemore/facade/event/VolunteerReviewRequestEvent.java b/src/main/java/com/somemore/volunteerapply/event/VolunteerReviewRequestEvent.java similarity index 96% rename from src/main/java/com/somemore/facade/event/VolunteerReviewRequestEvent.java rename to src/main/java/com/somemore/volunteerapply/event/VolunteerReviewRequestEvent.java index 2e7e43a82..7dfc61ad0 100644 --- a/src/main/java/com/somemore/facade/event/VolunteerReviewRequestEvent.java +++ b/src/main/java/com/somemore/volunteerapply/event/VolunteerReviewRequestEvent.java @@ -1,4 +1,4 @@ -package com.somemore.facade.event; +package com.somemore.volunteerapply.event; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/src/main/java/com/somemore/facade/volunteerapply/SettleVolunteerApplyFacadeService.java b/src/main/java/com/somemore/volunteerapply/service/SettleVolunteerApplyFacadeService.java similarity index 95% rename from src/main/java/com/somemore/facade/volunteerapply/SettleVolunteerApplyFacadeService.java rename to src/main/java/com/somemore/volunteerapply/service/SettleVolunteerApplyFacadeService.java index d6cfb6d4e..198775f09 100644 --- a/src/main/java/com/somemore/facade/volunteerapply/SettleVolunteerApplyFacadeService.java +++ b/src/main/java/com/somemore/volunteerapply/service/SettleVolunteerApplyFacadeService.java @@ -1,10 +1,10 @@ -package com.somemore.facade.volunteerapply; +package com.somemore.volunteerapply.service; import static com.somemore.global.exception.ExceptionMessage.RECRUIT_BOARD_ID_MISMATCH; import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_RECRUIT_BOARD; import static com.somemore.global.exception.ExceptionMessage.VOLUNTEER_APPLY_LIST_MISMATCH; -import com.somemore.facade.event.VolunteerReviewRequestEvent; +import com.somemore.volunteerapply.event.VolunteerReviewRequestEvent; import com.somemore.global.common.event.ServerEventPublisher; import com.somemore.global.common.event.ServerEventType; import com.somemore.global.exception.BadRequestException; @@ -14,6 +14,7 @@ import com.somemore.volunteer.usecase.UpdateVolunteerUseCase; import com.somemore.volunteerapply.domain.VolunteerApply; import com.somemore.volunteerapply.dto.request.VolunteerApplySettleRequestDto; +import com.somemore.volunteerapply.usecase.SettleVolunteerApplyFacadeUseCase; import com.somemore.volunteerapply.usecase.VolunteerApplyQueryUseCase; import java.util.List; import java.util.UUID; diff --git a/src/main/java/com/somemore/facade/volunteerapply/VolunteerApplyQueryFacadeService.java b/src/main/java/com/somemore/volunteerapply/service/VolunteerApplyQueryFacadeService.java similarity index 97% rename from src/main/java/com/somemore/facade/volunteerapply/VolunteerApplyQueryFacadeService.java rename to src/main/java/com/somemore/volunteerapply/service/VolunteerApplyQueryFacadeService.java index d717ed88e..9cff2af95 100644 --- a/src/main/java/com/somemore/facade/volunteerapply/VolunteerApplyQueryFacadeService.java +++ b/src/main/java/com/somemore/volunteerapply/service/VolunteerApplyQueryFacadeService.java @@ -1,4 +1,4 @@ -package com.somemore.facade.volunteerapply; +package com.somemore.volunteerapply.service; import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_RECRUIT_BOARD; @@ -11,6 +11,7 @@ import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; import com.somemore.volunteerapply.dto.response.VolunteerApplyRecruitInfoResponseDto; import com.somemore.volunteerapply.dto.response.VolunteerApplyVolunteerInfoResponseDto; +import com.somemore.volunteerapply.usecase.VolunteerApplyQueryFacadeUseCase; import com.somemore.volunteerapply.usecase.VolunteerApplyQueryUseCase; import java.util.List; import java.util.Map; diff --git a/src/main/java/com/somemore/facade/volunteerapply/SettleVolunteerApplyFacadeUseCase.java b/src/main/java/com/somemore/volunteerapply/usecase/SettleVolunteerApplyFacadeUseCase.java similarity index 84% rename from src/main/java/com/somemore/facade/volunteerapply/SettleVolunteerApplyFacadeUseCase.java rename to src/main/java/com/somemore/volunteerapply/usecase/SettleVolunteerApplyFacadeUseCase.java index 766ce4fb5..16468b503 100644 --- a/src/main/java/com/somemore/facade/volunteerapply/SettleVolunteerApplyFacadeUseCase.java +++ b/src/main/java/com/somemore/volunteerapply/usecase/SettleVolunteerApplyFacadeUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.facade.volunteerapply; +package com.somemore.volunteerapply.usecase; import com.somemore.volunteerapply.dto.request.VolunteerApplySettleRequestDto; import java.util.UUID; diff --git a/src/main/java/com/somemore/facade/volunteerapply/VolunteerApplyQueryFacadeUseCase.java b/src/main/java/com/somemore/volunteerapply/usecase/VolunteerApplyQueryFacadeUseCase.java similarity index 94% rename from src/main/java/com/somemore/facade/volunteerapply/VolunteerApplyQueryFacadeUseCase.java rename to src/main/java/com/somemore/volunteerapply/usecase/VolunteerApplyQueryFacadeUseCase.java index 5c1e7885e..6a00e71fd 100644 --- a/src/main/java/com/somemore/facade/volunteerapply/VolunteerApplyQueryFacadeUseCase.java +++ b/src/main/java/com/somemore/volunteerapply/usecase/VolunteerApplyQueryFacadeUseCase.java @@ -1,4 +1,4 @@ -package com.somemore.facade.volunteerapply; +package com.somemore.volunteerapply.usecase; import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; import com.somemore.volunteerapply.dto.response.VolunteerApplyRecruitInfoResponseDto; diff --git a/src/test/java/com/somemore/center/controller/CenterProfileCommandApiControllerTest.java b/src/test/java/com/somemore/center/controller/CenterProfileCommandApiControllerTest.java index 7adf89a45..5bbac1a94 100644 --- a/src/test/java/com/somemore/center/controller/CenterProfileCommandApiControllerTest.java +++ b/src/test/java/com/somemore/center/controller/CenterProfileCommandApiControllerTest.java @@ -1,11 +1,11 @@ package com.somemore.center.controller; import com.fasterxml.jackson.databind.ObjectMapper; -import com.somemore.ControllerTestSupport; -import com.somemore.WithMockCustomUser; +import com.somemore.support.ControllerTestSupport; +import com.somemore.support.annotation.WithMockCustomUser; import com.somemore.center.dto.request.CenterProfileUpdateRequestDto; import com.somemore.center.usecase.command.UpdateCenterProfileUseCase; -import com.somemore.imageupload.usecase.ImageUploadUseCase; +import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/test/java/com/somemore/center/controller/CenterQueryApiControllerTest.java b/src/test/java/com/somemore/center/controller/CenterQueryApiControllerTest.java index 55bd28c5d..15471fbd3 100644 --- a/src/test/java/com/somemore/center/controller/CenterQueryApiControllerTest.java +++ b/src/test/java/com/somemore/center/controller/CenterQueryApiControllerTest.java @@ -1,6 +1,6 @@ package com.somemore.center.controller; -import com.somemore.ControllerTestSupport; +import com.somemore.support.ControllerTestSupport; import com.somemore.center.dto.response.CenterProfileResponseDto; import com.somemore.center.usecase.query.CenterQueryUseCase; import com.somemore.global.exception.BadRequestException; diff --git a/src/test/java/com/somemore/center/controller/PreferItemCommandApiControllerTest.java b/src/test/java/com/somemore/center/controller/PreferItemCommandApiControllerTest.java index e683fa27e..5490f39da 100644 --- a/src/test/java/com/somemore/center/controller/PreferItemCommandApiControllerTest.java +++ b/src/test/java/com/somemore/center/controller/PreferItemCommandApiControllerTest.java @@ -1,7 +1,7 @@ package com.somemore.center.controller; -import com.somemore.ControllerTestSupport; -import com.somemore.WithMockCustomUser; +import com.somemore.support.ControllerTestSupport; +import com.somemore.support.annotation.WithMockCustomUser; import com.somemore.center.dto.request.PreferItemCreateRequestDto; import com.somemore.center.dto.response.PreferItemCreateResponseDto; import com.somemore.center.usecase.command.CreatePreferItemUseCase; diff --git a/src/test/java/com/somemore/center/repository/CenterRepositoryTest.java b/src/test/java/com/somemore/center/repository/CenterRepositoryTest.java index f504ac50d..3ef0b2d45 100644 --- a/src/test/java/com/somemore/center/repository/CenterRepositoryTest.java +++ b/src/test/java/com/somemore/center/repository/CenterRepositoryTest.java @@ -1,6 +1,6 @@ package com.somemore.center.repository; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.Center; import com.somemore.center.repository.center.CenterRepository; import jakarta.transaction.Transactional; diff --git a/src/test/java/com/somemore/center/repository/PreferItemRepositoryTest.java b/src/test/java/com/somemore/center/repository/PreferItemRepositoryTest.java index eec39c197..e19d91f03 100644 --- a/src/test/java/com/somemore/center/repository/PreferItemRepositoryTest.java +++ b/src/test/java/com/somemore/center/repository/PreferItemRepositoryTest.java @@ -1,6 +1,6 @@ package com.somemore.center.repository; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.PreferItem; import com.somemore.center.repository.preferitem.PreferItemJpaRepository; import com.somemore.center.repository.preferitem.PreferItemRepository; diff --git a/src/test/java/com/somemore/center/service/command/CreatePreferItemServiceTest.java b/src/test/java/com/somemore/center/service/command/CreatePreferItemServiceTest.java index ec875bff9..d66a8b2da 100644 --- a/src/test/java/com/somemore/center/service/command/CreatePreferItemServiceTest.java +++ b/src/test/java/com/somemore/center/service/command/CreatePreferItemServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.center.service.command; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.Center; import com.somemore.center.domain.PreferItem; import com.somemore.center.dto.request.PreferItemCreateRequestDto; diff --git a/src/test/java/com/somemore/center/service/command/DeletePreferItemServiceTest.java b/src/test/java/com/somemore/center/service/command/DeletePreferItemServiceTest.java index 4c6558599..da884ecc3 100644 --- a/src/test/java/com/somemore/center/service/command/DeletePreferItemServiceTest.java +++ b/src/test/java/com/somemore/center/service/command/DeletePreferItemServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.center.service.command; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.Center; import com.somemore.center.domain.PreferItem; import com.somemore.center.dto.request.PreferItemCreateRequestDto; diff --git a/src/test/java/com/somemore/center/service/command/UpdateCenterProfileServiceTest.java b/src/test/java/com/somemore/center/service/command/UpdateCenterProfileServiceTest.java index 18a4322a8..2eabf6f10 100644 --- a/src/test/java/com/somemore/center/service/command/UpdateCenterProfileServiceTest.java +++ b/src/test/java/com/somemore/center/service/command/UpdateCenterProfileServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.center.service.command; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.Center; import com.somemore.center.dto.request.CenterProfileUpdateRequestDto; import com.somemore.center.repository.center.CenterRepository; @@ -13,7 +13,7 @@ import java.util.UUID; -import static com.somemore.common.fixture.CenterFixture.createCenter; +import static com.somemore.support.fixture.CenterFixture.createCenter; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_CENTER; import static org.assertj.core.api.Assertions.*; diff --git a/src/test/java/com/somemore/center/service/query/CenterQueryServiceTest.java b/src/test/java/com/somemore/center/service/query/CenterQueryServiceTest.java index a95b94ce5..29dc914e6 100644 --- a/src/test/java/com/somemore/center/service/query/CenterQueryServiceTest.java +++ b/src/test/java/com/somemore/center/service/query/CenterQueryServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.center.service.query; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.Center; import com.somemore.center.domain.PreferItem; import com.somemore.center.repository.mapper.CenterOverviewInfo; diff --git a/src/test/java/com/somemore/center/service/query/CenterSignServiceTest.java b/src/test/java/com/somemore/center/service/query/CenterSignServiceTest.java index 16a771e35..73fdc170e 100644 --- a/src/test/java/com/somemore/center/service/query/CenterSignServiceTest.java +++ b/src/test/java/com/somemore/center/service/query/CenterSignServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.center.service.query; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.Center; import com.somemore.center.repository.center.CenterJpaRepository; import com.somemore.center.repository.center.CenterRepository; @@ -103,4 +103,4 @@ private static Center createCenter() { "password123" ); } -} \ No newline at end of file +} diff --git a/src/test/java/com/somemore/community/controller/CommunityBoardCommandApiControllerTest.java b/src/test/java/com/somemore/community/controller/CommunityBoardCommandApiControllerTest.java index 75c02276f..bfd6a8cf2 100644 --- a/src/test/java/com/somemore/community/controller/CommunityBoardCommandApiControllerTest.java +++ b/src/test/java/com/somemore/community/controller/CommunityBoardCommandApiControllerTest.java @@ -12,14 +12,14 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import com.fasterxml.jackson.databind.ObjectMapper; -import com.somemore.ControllerTestSupport; -import com.somemore.WithMockCustomUser; +import com.somemore.support.ControllerTestSupport; +import com.somemore.support.annotation.WithMockCustomUser; import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; import com.somemore.community.dto.request.CommunityBoardUpdateRequestDto; import com.somemore.community.usecase.board.CreateCommunityBoardUseCase; import com.somemore.community.usecase.board.DeleteCommunityBoardUseCase; import com.somemore.community.usecase.board.UpdateCommunityBoardUseCase; -import com.somemore.imageupload.usecase.ImageUploadUseCase; +import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; diff --git a/src/test/java/com/somemore/community/controller/CommunityBoardQueryApiControllerTest.java b/src/test/java/com/somemore/community/controller/CommunityBoardQueryApiControllerTest.java index e93d2fe99..fa3a74d20 100644 --- a/src/test/java/com/somemore/community/controller/CommunityBoardQueryApiControllerTest.java +++ b/src/test/java/com/somemore/community/controller/CommunityBoardQueryApiControllerTest.java @@ -8,7 +8,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -import com.somemore.ControllerTestSupport; +import com.somemore.support.ControllerTestSupport; import com.somemore.community.dto.response.CommunityBoardDetailResponseDto; import com.somemore.community.dto.response.CommunityBoardResponseDto; //import com.somemore.community.usecase.board.CommunityBoardDocumentUseCase; diff --git a/src/test/java/com/somemore/community/controller/CommunityCommentCommandApiControllerTest.java b/src/test/java/com/somemore/community/controller/CommunityCommentCommandApiControllerTest.java index 1573ba6cc..1e30a765d 100644 --- a/src/test/java/com/somemore/community/controller/CommunityCommentCommandApiControllerTest.java +++ b/src/test/java/com/somemore/community/controller/CommunityCommentCommandApiControllerTest.java @@ -9,8 +9,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import com.fasterxml.jackson.databind.ObjectMapper; -import com.somemore.ControllerTestSupport; -import com.somemore.WithMockCustomUser; +import com.somemore.support.ControllerTestSupport; +import com.somemore.support.annotation.WithMockCustomUser; import com.somemore.community.dto.request.CommunityCommentCreateRequestDto; import com.somemore.community.dto.request.CommunityCommentUpdateRequestDto; import com.somemore.community.usecase.comment.CreateCommunityCommentUseCase; diff --git a/src/test/java/com/somemore/community/controller/CommunityCommentQueryApiControllerTest.java b/src/test/java/com/somemore/community/controller/CommunityCommentQueryApiControllerTest.java index 46ea7a9fd..0e4bf7b24 100644 --- a/src/test/java/com/somemore/community/controller/CommunityCommentQueryApiControllerTest.java +++ b/src/test/java/com/somemore/community/controller/CommunityCommentQueryApiControllerTest.java @@ -8,7 +8,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -import com.somemore.ControllerTestSupport; +import com.somemore.support.ControllerTestSupport; import com.somemore.community.dto.response.CommunityCommentResponseDto; import java.util.Collections; diff --git a/src/test/java/com/somemore/community/repository/CommunityBoardDocumentRepositoryTest.java b/src/test/java/com/somemore/community/repository/CommunityBoardDocumentRepositoryTest.java index a2f08fa19..58d7c224a 100644 --- a/src/test/java/com/somemore/community/repository/CommunityBoardDocumentRepositoryTest.java +++ b/src/test/java/com/somemore/community/repository/CommunityBoardDocumentRepositoryTest.java @@ -1,6 +1,6 @@ //package com.somemore.community.repository; // -//import com.somemore.IntegrationTestSupport; +//import com.somemore.support.IntegrationTestSupport; //import com.somemore.auth.oauth.OAuthProvider; //import com.somemore.community.domain.CommunityBoard; //import com.somemore.community.repository.board.CommunityBoardRepository; diff --git a/src/test/java/com/somemore/community/repository/CommunityBoardRepositoryTest.java b/src/test/java/com/somemore/community/repository/CommunityBoardRepositoryTest.java index a49a52589..2cd004f77 100644 --- a/src/test/java/com/somemore/community/repository/CommunityBoardRepositoryTest.java +++ b/src/test/java/com/somemore/community/repository/CommunityBoardRepositoryTest.java @@ -1,7 +1,7 @@ package com.somemore.community.repository; -import com.somemore.IntegrationTestSupport; -import com.somemore.auth.oauth.OAuthProvider; +import com.somemore.support.IntegrationTestSupport; +import com.somemore.global.auth.oauth.OAuthProvider; import com.somemore.community.domain.CommunityBoard; import com.somemore.community.repository.mapper.CommunityBoardView; import com.somemore.community.repository.board.CommunityBoardRepository; @@ -16,10 +16,8 @@ import org.springframework.data.domain.Pageable; import org.springframework.transaction.annotation.Transactional; -import static com.somemore.common.fixture.CommunityBoardFixture.createCommunityBoard; +import static com.somemore.support.fixture.CommunityBoardFixture.createCommunityBoard; -import java.util.ArrayList; -import java.util.List; import java.util.Optional; import java.util.UUID; diff --git a/src/test/java/com/somemore/community/repository/CommunityCommentRepositoryTest.java b/src/test/java/com/somemore/community/repository/CommunityCommentRepositoryTest.java index e32c5f2c4..3b244481b 100644 --- a/src/test/java/com/somemore/community/repository/CommunityCommentRepositoryTest.java +++ b/src/test/java/com/somemore/community/repository/CommunityCommentRepositoryTest.java @@ -1,7 +1,7 @@ package com.somemore.community.repository; -import com.somemore.IntegrationTestSupport; -import com.somemore.auth.oauth.OAuthProvider; +import com.somemore.support.IntegrationTestSupport; +import com.somemore.global.auth.oauth.OAuthProvider; import com.somemore.community.domain.CommunityBoard; import com.somemore.community.domain.CommunityComment; import com.somemore.community.repository.board.CommunityBoardRepository; @@ -22,8 +22,8 @@ import java.util.UUID; import static org.assertj.core.api.Assertions.assertThat; -import static com.somemore.common.fixture.CommunityBoardFixture.createCommunityBoard; -import static com.somemore.common.fixture.CommunityCommentFixture.createCommunityComment; +import static com.somemore.support.fixture.CommunityBoardFixture.createCommunityBoard; +import static com.somemore.support.fixture.CommunityCommentFixture.createCommunityComment; @Transactional class CommunityCommentRepositoryTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/community/scheduler/CommunityBoardUpdateSchedulerTest.java b/src/test/java/com/somemore/community/scheduler/CommunityBoardUpdateSchedulerTest.java index 1289e2582..bf84abd3c 100644 --- a/src/test/java/com/somemore/community/scheduler/CommunityBoardUpdateSchedulerTest.java +++ b/src/test/java/com/somemore/community/scheduler/CommunityBoardUpdateSchedulerTest.java @@ -1,6 +1,6 @@ //package com.somemore.community.scheduler; // -//import com.somemore.IntegrationTestSupport; +//import com.somemore.support.IntegrationTestSupport; //import com.somemore.community.repository.board.CommunityBoardRepository; //import com.somemore.community.repository.mapper.CommunityBoardView; //import org.awaitility.Awaitility; diff --git a/src/test/java/com/somemore/community/service/board/CommunityBoardDocumentServiceTest.java b/src/test/java/com/somemore/community/service/board/CommunityBoardDocumentServiceTest.java index bef42bbc9..c547dd864 100644 --- a/src/test/java/com/somemore/community/service/board/CommunityBoardDocumentServiceTest.java +++ b/src/test/java/com/somemore/community/service/board/CommunityBoardDocumentServiceTest.java @@ -1,6 +1,6 @@ //package com.somemore.community.service.board; // -//import com.somemore.IntegrationTestSupport; +//import com.somemore.support.IntegrationTestSupport; //import com.somemore.auth.oauth.OAuthProvider; //import com.somemore.community.domain.CommunityBoard; //import com.somemore.community.dto.response.CommunityBoardResponseDto; diff --git a/src/test/java/com/somemore/community/service/board/CommunityBoardQueryServiceTest.java b/src/test/java/com/somemore/community/service/board/CommunityBoardQueryServiceTest.java index 511c3a555..9cef4d8ff 100644 --- a/src/test/java/com/somemore/community/service/board/CommunityBoardQueryServiceTest.java +++ b/src/test/java/com/somemore/community/service/board/CommunityBoardQueryServiceTest.java @@ -1,7 +1,7 @@ package com.somemore.community.service.board; -import com.somemore.IntegrationTestSupport; -import com.somemore.auth.oauth.OAuthProvider; +import com.somemore.support.IntegrationTestSupport; +import com.somemore.global.auth.oauth.OAuthProvider; import com.somemore.center.repository.center.CenterRepository; import com.somemore.community.domain.CommunityBoard; import com.somemore.community.dto.response.CommunityBoardDetailResponseDto; @@ -21,14 +21,12 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; -import java.util.ArrayList; -import java.util.List; import java.util.UUID; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import static com.somemore.common.fixture.CommunityBoardFixture.createCommunityBoard; +import static com.somemore.support.fixture.CommunityBoardFixture.createCommunityBoard; class CommunityBoardQueryServiceTest extends IntegrationTestSupport { diff --git a/src/test/java/com/somemore/community/service/board/CreateCommunityBoardServiceTest.java b/src/test/java/com/somemore/community/service/board/CreateCommunityBoardServiceTest.java index ec9db956b..60a807e0b 100644 --- a/src/test/java/com/somemore/community/service/board/CreateCommunityBoardServiceTest.java +++ b/src/test/java/com/somemore/community/service/board/CreateCommunityBoardServiceTest.java @@ -2,7 +2,7 @@ import static org.assertj.core.api.Assertions.assertThat; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.community.domain.CommunityBoard; import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; import com.somemore.community.repository.board.CommunityBoardRepository; diff --git a/src/test/java/com/somemore/community/service/board/DeleteCommunityBoardServiceTest.java b/src/test/java/com/somemore/community/service/board/DeleteCommunityBoardServiceTest.java index e09ef643c..61a228c12 100644 --- a/src/test/java/com/somemore/community/service/board/DeleteCommunityBoardServiceTest.java +++ b/src/test/java/com/somemore/community/service/board/DeleteCommunityBoardServiceTest.java @@ -3,7 +3,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; import com.somemore.community.repository.board.CommunityBoardRepository; import com.somemore.community.usecase.board.CreateCommunityBoardUseCase; diff --git a/src/test/java/com/somemore/community/service/board/UpdateCommunityBoardServiceTest.java b/src/test/java/com/somemore/community/service/board/UpdateCommunityBoardServiceTest.java index 5e7f30264..43b7288bc 100644 --- a/src/test/java/com/somemore/community/service/board/UpdateCommunityBoardServiceTest.java +++ b/src/test/java/com/somemore/community/service/board/UpdateCommunityBoardServiceTest.java @@ -3,7 +3,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.community.domain.CommunityBoard; import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; import com.somemore.community.dto.request.CommunityBoardUpdateRequestDto; diff --git a/src/test/java/com/somemore/community/service/comment/CommunityCommentQueryServiceTest.java b/src/test/java/com/somemore/community/service/comment/CommunityCommentQueryServiceTest.java index b4f44c87b..2e2b0d4d8 100644 --- a/src/test/java/com/somemore/community/service/comment/CommunityCommentQueryServiceTest.java +++ b/src/test/java/com/somemore/community/service/comment/CommunityCommentQueryServiceTest.java @@ -1,7 +1,7 @@ package com.somemore.community.service.comment; -import com.somemore.IntegrationTestSupport; -import com.somemore.auth.oauth.OAuthProvider; +import com.somemore.support.IntegrationTestSupport; +import com.somemore.global.auth.oauth.OAuthProvider; import com.somemore.community.domain.CommunityBoard; import com.somemore.community.domain.CommunityComment; import com.somemore.community.dto.response.CommunityCommentResponseDto; @@ -20,8 +20,8 @@ import java.util.UUID; import static org.assertj.core.api.Assertions.assertThat; -import static com.somemore.common.fixture.CommunityBoardFixture.createCommunityBoard; -import static com.somemore.common.fixture.CommunityCommentFixture.createCommunityComment; +import static com.somemore.support.fixture.CommunityBoardFixture.createCommunityBoard; +import static com.somemore.support.fixture.CommunityCommentFixture.createCommunityComment; class CommunityCommentQueryServiceTest extends IntegrationTestSupport { @Autowired diff --git a/src/test/java/com/somemore/community/service/comment/CreateCommunityCommentServiceTest.java b/src/test/java/com/somemore/community/service/comment/CreateCommunityCommentServiceTest.java index b811cab06..529bc68b6 100644 --- a/src/test/java/com/somemore/community/service/comment/CreateCommunityCommentServiceTest.java +++ b/src/test/java/com/somemore/community/service/comment/CreateCommunityCommentServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.community.service.comment; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.community.domain.CommunityBoard; import com.somemore.community.domain.CommunityComment; import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; diff --git a/src/test/java/com/somemore/community/service/comment/DeleteCommunityCommentServiceTest.java b/src/test/java/com/somemore/community/service/comment/DeleteCommunityCommentServiceTest.java index bf159279a..35ecc311b 100644 --- a/src/test/java/com/somemore/community/service/comment/DeleteCommunityCommentServiceTest.java +++ b/src/test/java/com/somemore/community/service/comment/DeleteCommunityCommentServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.community.service.comment; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.community.domain.CommunityBoard; import com.somemore.community.domain.CommunityComment; import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; diff --git a/src/test/java/com/somemore/community/service/comment/UpdateCommunityCommentServiceTest.java b/src/test/java/com/somemore/community/service/comment/UpdateCommunityCommentServiceTest.java index c86c81177..6931ca6bb 100644 --- a/src/test/java/com/somemore/community/service/comment/UpdateCommunityCommentServiceTest.java +++ b/src/test/java/com/somemore/community/service/comment/UpdateCommunityCommentServiceTest.java @@ -5,7 +5,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.community.domain.CommunityBoard; import com.somemore.community.domain.CommunityComment; import com.somemore.community.dto.request.CommunityBoardCreateRequestDto; diff --git a/src/test/java/com/somemore/auth/cookie/CookieServiceTest.java b/src/test/java/com/somemore/global/auth/cookie/CookieServiceTest.java similarity index 90% rename from src/test/java/com/somemore/auth/cookie/CookieServiceTest.java rename to src/test/java/com/somemore/global/auth/cookie/CookieServiceTest.java index 6dbab7163..17ac5b790 100644 --- a/src/test/java/com/somemore/auth/cookie/CookieServiceTest.java +++ b/src/test/java/com/somemore/global/auth/cookie/CookieServiceTest.java @@ -1,6 +1,7 @@ -package com.somemore.auth.cookie; +package com.somemore.global.auth.cookie; -import com.somemore.auth.jwt.domain.TokenType; +import com.somemore.global.auth.cookie.CookieService; +import com.somemore.global.auth.jwt.domain.TokenType; import org.junit.jupiter.api.Test; import org.springframework.mock.web.MockHttpServletResponse; @@ -41,4 +42,4 @@ void deleteAccessToken_ShouldRemoveCookie() { assertThat(setCookieHeader).contains("Max-Age=0"); // 삭제 assertThat(setCookieHeader).contains("Path=/"); } -} \ No newline at end of file +} diff --git a/src/test/java/com/somemore/auth/jwt/service/JwtServiceTest.java b/src/test/java/com/somemore/global/auth/jwt/service/JwtServiceTest.java similarity index 94% rename from src/test/java/com/somemore/auth/jwt/service/JwtServiceTest.java rename to src/test/java/com/somemore/global/auth/jwt/service/JwtServiceTest.java index 04119a8d6..0aa802e5d 100644 --- a/src/test/java/com/somemore/auth/jwt/service/JwtServiceTest.java +++ b/src/test/java/com/somemore/global/auth/jwt/service/JwtServiceTest.java @@ -1,14 +1,15 @@ -package com.somemore.auth.jwt.service; - -import com.somemore.IntegrationTestSupport; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.domain.TokenType; -import com.somemore.auth.jwt.domain.UserRole; -import com.somemore.auth.jwt.exception.JwtErrorType; -import com.somemore.auth.jwt.exception.JwtException; -import com.somemore.auth.jwt.refresh.domain.RefreshToken; -import com.somemore.auth.jwt.refresh.manager.RefreshTokenManager; -import com.somemore.auth.jwt.validator.JwtValidator; +package com.somemore.global.auth.jwt.service; + +import com.somemore.support.IntegrationTestSupport; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.domain.TokenType; +import com.somemore.global.auth.jwt.domain.UserRole; +import com.somemore.global.auth.jwt.exception.JwtErrorType; +import com.somemore.global.auth.jwt.exception.JwtException; +import com.somemore.global.auth.jwt.refresh.domain.RefreshToken; +import com.somemore.global.auth.jwt.refresh.manager.RefreshTokenManager; +import com.somemore.global.auth.jwt.service.JwtService; +import com.somemore.global.auth.jwt.validator.JwtValidator; import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jwts; import org.junit.jupiter.api.AfterEach; diff --git a/src/test/java/com/somemore/imageupload/service/ImageUploadServiceTest.java b/src/test/java/com/somemore/global/imageupload/service/ImageUploadServiceTest.java similarity index 84% rename from src/test/java/com/somemore/imageupload/service/ImageUploadServiceTest.java rename to src/test/java/com/somemore/global/imageupload/service/ImageUploadServiceTest.java index bdc49a87d..0e3412cfb 100644 --- a/src/test/java/com/somemore/imageupload/service/ImageUploadServiceTest.java +++ b/src/test/java/com/somemore/global/imageupload/service/ImageUploadServiceTest.java @@ -1,9 +1,22 @@ -package com.somemore.imageupload.service; +package com.somemore.global.imageupload.service; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.BDDMockito.given; +import static org.mockito.Mockito.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; -import com.somemore.IntegrationTestSupport; import com.somemore.global.exception.ImageUploadException; -import com.somemore.imageupload.dto.ImageUploadRequestDto; -import com.somemore.imageupload.validator.ImageUploadValidator; +import com.somemore.global.imageupload.dto.ImageUploadRequestDto; +import com.somemore.global.imageupload.validator.ImageUploadValidator; +import com.somemore.support.IntegrationTestSupport; +import java.io.IOException; +import java.io.InputStream; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; @@ -16,14 +29,6 @@ import software.amazon.awssdk.services.s3.S3Client; import software.amazon.awssdk.services.s3.model.PutObjectRequest; -import java.io.IOException; -import java.io.InputStream; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.*; -import static org.mockito.BDDMockito.given; -import static org.mockito.Mockito.*; - class ImageUploadServiceTest extends IntegrationTestSupport { @Mock diff --git a/src/test/java/com/somemore/imageupload/util/ImageUploadUtilsTest.java b/src/test/java/com/somemore/global/imageupload/util/ImageUploadUtilsTest.java similarity index 82% rename from src/test/java/com/somemore/imageupload/util/ImageUploadUtilsTest.java rename to src/test/java/com/somemore/global/imageupload/util/ImageUploadUtilsTest.java index 15180389b..65e7eabbe 100644 --- a/src/test/java/com/somemore/imageupload/util/ImageUploadUtilsTest.java +++ b/src/test/java/com/somemore/global/imageupload/util/ImageUploadUtilsTest.java @@ -1,12 +1,15 @@ -package com.somemore.imageupload.util; +package com.somemore.global.imageupload.util; -import org.junit.jupiter.api.DisplayName; -import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; - -import static org.junit.jupiter.api.Assertions.*; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; class ImageUploadUtilsTest { @@ -17,10 +20,13 @@ void privateConstructorShouldThrowException() throws Exception { constructor.setAccessible(true); // when - InvocationTargetException exception = assertThrows(InvocationTargetException.class, constructor::newInstance); + InvocationTargetException exception = assertThrows(InvocationTargetException.class, + constructor::newInstance); // then - assertThrows(UnsupportedOperationException.class, () -> { throw exception.getCause(); }); + assertThrows(UnsupportedOperationException.class, () -> { + throw exception.getCause(); + }); } @DisplayName("이미지 업로드시 유일한 이미지 이름을 만들어줄 수 있다.") @@ -81,4 +87,4 @@ void testGenerateS3Url_emptyBaseUrl() { assertEquals("/unique-image.png", url); } -} \ No newline at end of file +} diff --git a/src/test/java/com/somemore/imageupload/validator/DefaultImageUploadValidatorTest.java b/src/test/java/com/somemore/global/imageupload/validator/DefaultImageUploadValidatorTest.java similarity index 77% rename from src/test/java/com/somemore/imageupload/validator/DefaultImageUploadValidatorTest.java rename to src/test/java/com/somemore/global/imageupload/validator/DefaultImageUploadValidatorTest.java index 3a33e0b4c..f4f13a673 100644 --- a/src/test/java/com/somemore/imageupload/validator/DefaultImageUploadValidatorTest.java +++ b/src/test/java/com/somemore/global/imageupload/validator/DefaultImageUploadValidatorTest.java @@ -1,4 +1,9 @@ -package com.somemore.imageupload.validator; +package com.somemore.global.imageupload.validator; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertThrows; import com.somemore.global.exception.ImageUploadException; import org.junit.jupiter.api.BeforeEach; @@ -7,9 +12,6 @@ import org.springframework.mock.web.MockMultipartFile; import org.springframework.web.multipart.MultipartFile; -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.*; - class DefaultImageUploadValidatorTest { private DefaultImageUploadValidator imageUploadValidator; @@ -37,10 +39,12 @@ void shouldThrowExceptionWhenFileIsEmpty() { @DisplayName("파일 크기가 최대 8MB를 초과하는 경우, 예외가 발생한다.") void shouldThrowExceptionWhenFileSizeExceeded() { // given - MultipartFile largeFile = new MockMultipartFile("file", "largeImage.jpg", "image/jpeg", new byte[9 * 1024 * 1024]); + MultipartFile largeFile = new MockMultipartFile("file", "largeImage.jpg", "image/jpeg", + new byte[9 * 1024 * 1024]); // when - Throwable exception = assertThrows(ImageUploadException.class, () -> imageUploadValidator.validateFileSize(largeFile)); + Throwable exception = assertThrows(ImageUploadException.class, + () -> imageUploadValidator.validateFileSize(largeFile)); // then assertEquals(ImageUploadException.class, exception.getClass()); @@ -50,7 +54,8 @@ void shouldThrowExceptionWhenFileSizeExceeded() { @DisplayName("유효한 이미지 타입(JPEG) 파일은, 검증에 통과한다.") void shouldNotThrowExceptionWhenFileTypeIsValidJpeg() { // given - MultipartFile validFile = new MockMultipartFile("file", "validImage.jpg", "image/jpeg", new byte[1024]); + MultipartFile validFile = new MockMultipartFile("file", "validImage.jpg", "image/jpeg", + new byte[1024]); // when imageUploadValidator.validateFileType(validFile); @@ -63,10 +68,12 @@ void shouldNotThrowExceptionWhenFileTypeIsValidJpeg() { @DisplayName("유효하지 않은 이미지 타입 파일이 있을 경우, 예외가 발생한다.") void shouldThrowExceptionWhenFileTypeIsInvalid() { // given - MultipartFile invalidFile = new MockMultipartFile("file", "invalidFile.pdf", "application/pdf", new byte[1024]); + MultipartFile invalidFile = new MockMultipartFile("file", "invalidFile.pdf", + "application/pdf", new byte[1024]); // when - Throwable exception = assertThrows(ImageUploadException.class, () -> imageUploadValidator.validateFileType(invalidFile)); + Throwable exception = assertThrows(ImageUploadException.class, + () -> imageUploadValidator.validateFileType(invalidFile)); // then assertEquals(ImageUploadException.class, exception.getClass()); @@ -76,10 +83,12 @@ void shouldThrowExceptionWhenFileTypeIsInvalid() { @DisplayName("파일 타입이 올바르지 않을 경우, 예외가 발생한다.") void shouldThrowExceptionWhenFileTypeIsNull() { // given - MultipartFile nullContentTypeFile = new MockMultipartFile("file", "noContentTypeFile.jpg", null, new byte[1024]); + MultipartFile nullContentTypeFile = new MockMultipartFile("file", "noContentTypeFile.jpg", + null, new byte[1024]); // when - Throwable exception = assertThrows(ImageUploadException.class, () -> imageUploadValidator.validateFileType(nullContentTypeFile)); + Throwable exception = assertThrows(ImageUploadException.class, + () -> imageUploadValidator.validateFileType(nullContentTypeFile)); // then assertEquals(ImageUploadException.class, exception.getClass()); diff --git a/src/test/java/com/somemore/sse/repository/EmitterRepositoryTest.java b/src/test/java/com/somemore/global/sse/repository/EmitterRepositoryTest.java similarity index 98% rename from src/test/java/com/somemore/sse/repository/EmitterRepositoryTest.java rename to src/test/java/com/somemore/global/sse/repository/EmitterRepositoryTest.java index 1dc1a6593..36339cc72 100644 --- a/src/test/java/com/somemore/sse/repository/EmitterRepositoryTest.java +++ b/src/test/java/com/somemore/global/sse/repository/EmitterRepositoryTest.java @@ -1,15 +1,14 @@ -package com.somemore.sse.repository; +package com.somemore.global.sse.repository; +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.Map; +import java.util.UUID; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; -import java.util.Map; -import java.util.UUID; - -import static org.assertj.core.api.Assertions.assertThat; - class EmitterRepositoryTest { private EmitterRepositoryImpl emitterRepository; diff --git a/src/test/java/com/somemore/sse/sender/SseSenderTest.java b/src/test/java/com/somemore/global/sse/sender/SseSenderTest.java similarity index 92% rename from src/test/java/com/somemore/sse/sender/SseSenderTest.java rename to src/test/java/com/somemore/global/sse/sender/SseSenderTest.java index 48b7559f5..9b6b28aec 100644 --- a/src/test/java/com/somemore/sse/sender/SseSenderTest.java +++ b/src/test/java/com/somemore/global/sse/sender/SseSenderTest.java @@ -1,20 +1,19 @@ -package com.somemore.sse.sender; +package com.somemore.global.sse.sender; -import com.somemore.IntegrationTestSupport; -import com.somemore.sse.domain.SseEvent; -import com.somemore.sse.domain.SseEventType; -import com.somemore.sse.repository.EmitterRepository; +import static org.assertj.core.api.Assertions.assertThat; + +import com.somemore.global.sse.domain.SseEvent; +import com.somemore.global.sse.domain.SseEventType; +import com.somemore.global.sse.repository.EmitterRepository; +import com.somemore.support.IntegrationTestSupport; +import java.io.IOException; +import java.util.UUID; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; -import java.io.IOException; -import java.util.UUID; - -import static org.assertj.core.api.Assertions.assertThat; - class SseSenderTest extends IntegrationTestSupport { @Autowired @@ -47,7 +46,6 @@ void sendEventSuccessfully() { } - @DisplayName("SSE 전송 중 IOException 발생 시 emitter를 제거한다.") @Test void removeEmitterOnIOException() { @@ -95,6 +93,7 @@ void sendEventToMultipleEmitters() { } static class TestableSseEmitter extends SseEmitter { + private boolean eventSent = false; @Override diff --git a/src/test/java/com/somemore/sse/service/SseServiceTest.java b/src/test/java/com/somemore/global/sse/service/SseServiceTest.java similarity index 82% rename from src/test/java/com/somemore/sse/service/SseServiceTest.java rename to src/test/java/com/somemore/global/sse/service/SseServiceTest.java index 664fd396f..86dd51ffd 100644 --- a/src/test/java/com/somemore/sse/service/SseServiceTest.java +++ b/src/test/java/com/somemore/global/sse/service/SseServiceTest.java @@ -1,15 +1,14 @@ -package com.somemore.sse.service; +package com.somemore.global.sse.service; -import com.somemore.IntegrationTestSupport; -import com.somemore.sse.repository.EmitterRepository; +import static org.assertj.core.api.Assertions.assertThat; + +import com.somemore.global.sse.repository.EmitterRepository; +import com.somemore.support.IntegrationTestSupport; +import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import java.util.UUID; - -import static org.assertj.core.api.Assertions.assertThat; - class SseServiceTest extends IntegrationTestSupport { @Autowired diff --git a/src/test/java/com/somemore/sse/subscriber/SseSubscriptionManagerTest.java b/src/test/java/com/somemore/global/sse/subscriber/SseSubscriptionManagerTest.java similarity index 87% rename from src/test/java/com/somemore/sse/subscriber/SseSubscriptionManagerTest.java rename to src/test/java/com/somemore/global/sse/subscriber/SseSubscriptionManagerTest.java index bf487fdf5..04d319f67 100644 --- a/src/test/java/com/somemore/sse/subscriber/SseSubscriptionManagerTest.java +++ b/src/test/java/com/somemore/global/sse/subscriber/SseSubscriptionManagerTest.java @@ -1,18 +1,17 @@ -package com.somemore.sse.subscriber; +package com.somemore.global.sse.subscriber; -import com.somemore.IntegrationTestSupport; -import com.somemore.sse.repository.EmitterRepository; +import static org.assertj.core.api.Assertions.assertThat; + +import com.somemore.global.sse.repository.EmitterRepository; +import com.somemore.support.IntegrationTestSupport; +import java.util.Map; +import java.util.UUID; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; -import java.util.Map; -import java.util.UUID; - -import static org.assertj.core.api.Assertions.assertThat; - class SseSubscriptionManagerTest extends IntegrationTestSupport { @Autowired diff --git a/src/test/java/com/somemore/interestcenter/controller/InterestCenterCommandApiControllerTest.java b/src/test/java/com/somemore/interestcenter/controller/InterestCenterCommandApiControllerTest.java index f49939e5a..bb934cc03 100644 --- a/src/test/java/com/somemore/interestcenter/controller/InterestCenterCommandApiControllerTest.java +++ b/src/test/java/com/somemore/interestcenter/controller/InterestCenterCommandApiControllerTest.java @@ -1,7 +1,7 @@ package com.somemore.interestcenter.controller; -import com.somemore.ControllerTestSupport; -import com.somemore.WithMockCustomUser; +import com.somemore.support.ControllerTestSupport; +import com.somemore.support.annotation.WithMockCustomUser; import com.somemore.interestcenter.dto.request.RegisterInterestCenterRequestDto; import com.somemore.interestcenter.dto.response.RegisterInterestCenterResponseDto; import com.somemore.interestcenter.usecase.CancelInterestCenterUseCase; @@ -12,7 +12,6 @@ import org.springframework.boot.test.mock.mockito.MockBean; import java.util.UUID; -import org.springframework.security.test.context.support.WithMockUser; import static org.mockito.BDDMockito.given; import static org.mockito.ArgumentMatchers.any; diff --git a/src/test/java/com/somemore/interestcenter/controller/InterestCenterQueryApiControllerTest.java b/src/test/java/com/somemore/interestcenter/controller/InterestCenterQueryApiControllerTest.java index 80eabcea0..fb2464ef6 100644 --- a/src/test/java/com/somemore/interestcenter/controller/InterestCenterQueryApiControllerTest.java +++ b/src/test/java/com/somemore/interestcenter/controller/InterestCenterQueryApiControllerTest.java @@ -1,7 +1,7 @@ package com.somemore.interestcenter.controller; -import com.somemore.ControllerTestSupport; -import com.somemore.WithMockCustomUser; +import com.somemore.support.ControllerTestSupport; +import com.somemore.support.annotation.WithMockCustomUser; import com.somemore.interestcenter.dto.response.InterestCentersResponseDto; import com.somemore.interestcenter.usecase.InterestCenterQueryUseCase; import org.junit.jupiter.api.DisplayName; diff --git a/src/test/java/com/somemore/interestcenter/converter/CreateRecruitBoardMessageConverterTest.java b/src/test/java/com/somemore/interestcenter/converter/CreateRecruitBoardMessageConverterTest.java index 7e7143b61..98531b7c4 100644 --- a/src/test/java/com/somemore/interestcenter/converter/CreateRecruitBoardMessageConverterTest.java +++ b/src/test/java/com/somemore/interestcenter/converter/CreateRecruitBoardMessageConverterTest.java @@ -1,6 +1,6 @@ package com.somemore.interestcenter.converter; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.global.common.event.DomainEventSubType; import com.somemore.global.common.event.ServerEventType; import com.somemore.interestcenter.event.converter.CreateRecruitBoardMessageConverter; diff --git a/src/test/java/com/somemore/interestcenter/handler/CreateRecruitBoardHandlerImplTest.java b/src/test/java/com/somemore/interestcenter/handler/CreateRecruitBoardHandlerImplTest.java index 4566f18be..22a767fc1 100644 --- a/src/test/java/com/somemore/interestcenter/handler/CreateRecruitBoardHandlerImplTest.java +++ b/src/test/java/com/somemore/interestcenter/handler/CreateRecruitBoardHandlerImplTest.java @@ -1,6 +1,6 @@ package com.somemore.interestcenter.handler; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.global.common.event.ServerEventPublisher; import com.somemore.interestcenter.event.domain.InterestCenterCreateRecruitBoardEvent; import com.somemore.interestcenter.event.handler.CreateRecruitBoardHandlerImpl; diff --git a/src/test/java/com/somemore/interestcenter/repository/InterestCenterRepositoryImplTest.java b/src/test/java/com/somemore/interestcenter/repository/InterestCenterRepositoryImplTest.java index c037f1f0c..1d3956f2d 100644 --- a/src/test/java/com/somemore/interestcenter/repository/InterestCenterRepositoryImplTest.java +++ b/src/test/java/com/somemore/interestcenter/repository/InterestCenterRepositoryImplTest.java @@ -2,7 +2,7 @@ import static org.assertj.core.api.Assertions.assertThat; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.interestcenter.domain.InterestCenter; import java.util.Optional; import java.util.UUID; diff --git a/src/test/java/com/somemore/interestcenter/service/CancelInterestCenterServiceTest.java b/src/test/java/com/somemore/interestcenter/service/CancelInterestCenterServiceTest.java index a174f7302..6c64a0651 100644 --- a/src/test/java/com/somemore/interestcenter/service/CancelInterestCenterServiceTest.java +++ b/src/test/java/com/somemore/interestcenter/service/CancelInterestCenterServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.interestcenter.service; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.Center; import com.somemore.center.repository.center.CenterRepository; import com.somemore.global.exception.BadRequestException; diff --git a/src/test/java/com/somemore/interestcenter/service/InterestCenterQueryServiceTest.java b/src/test/java/com/somemore/interestcenter/service/InterestCenterQueryServiceTest.java index 1768a9d60..b542aada6 100644 --- a/src/test/java/com/somemore/interestcenter/service/InterestCenterQueryServiceTest.java +++ b/src/test/java/com/somemore/interestcenter/service/InterestCenterQueryServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.interestcenter.service; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.Center; import com.somemore.center.repository.center.CenterJpaRepository; import com.somemore.interestcenter.domain.InterestCenter; @@ -146,4 +146,4 @@ private InterestCenter createInterestCenter(UUID volunteerId, UUID centerId) { .centerId(centerId) .build(); } -} \ No newline at end of file +} diff --git a/src/test/java/com/somemore/interestcenter/service/RegisterInterestCenterServiceTest.java b/src/test/java/com/somemore/interestcenter/service/RegisterInterestCenterServiceTest.java index 23e5f528f..333fb2a24 100644 --- a/src/test/java/com/somemore/interestcenter/service/RegisterInterestCenterServiceTest.java +++ b/src/test/java/com/somemore/interestcenter/service/RegisterInterestCenterServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.interestcenter.service; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.Center; import com.somemore.center.repository.center.CenterRepository; import com.somemore.global.exception.BadRequestException; diff --git a/src/test/java/com/somemore/location/repository/LocationRepositoryTest.java b/src/test/java/com/somemore/location/repository/LocationRepositoryTest.java index b5c29b1f2..2f2d19a76 100644 --- a/src/test/java/com/somemore/location/repository/LocationRepositoryTest.java +++ b/src/test/java/com/somemore/location/repository/LocationRepositoryTest.java @@ -3,7 +3,7 @@ import static java.math.RoundingMode.HALF_UP; import static org.assertj.core.api.Assertions.assertThat; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.location.domain.Location; import java.math.BigDecimal; import org.junit.jupiter.api.AfterEach; @@ -61,4 +61,4 @@ void testLocationPrecisionWithLargeValues() { assertThat(savedLocation.getLatitude()).isEqualTo(new BigDecimal("90.00000000")); assertThat(savedLocation.getLongitude()).isEqualTo(new BigDecimal("180.00000000")); } -} \ No newline at end of file +} diff --git a/src/test/java/com/somemore/location/service/command/CreateLocationServiceTest.java b/src/test/java/com/somemore/location/service/command/CreateLocationServiceTest.java index 8ff85f49c..6c0d3289c 100644 --- a/src/test/java/com/somemore/location/service/command/CreateLocationServiceTest.java +++ b/src/test/java/com/somemore/location/service/command/CreateLocationServiceTest.java @@ -2,7 +2,7 @@ import static org.assertj.core.api.Assertions.assertThat; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.location.domain.Location; import com.somemore.location.dto.request.LocationCreateRequestDto; import com.somemore.location.repository.LocationRepository; diff --git a/src/test/java/com/somemore/location/service/command/UpdateLocationServiceTest.java b/src/test/java/com/somemore/location/service/command/UpdateLocationServiceTest.java index 9c815a5a6..c5cb7f190 100644 --- a/src/test/java/com/somemore/location/service/command/UpdateLocationServiceTest.java +++ b/src/test/java/com/somemore/location/service/command/UpdateLocationServiceTest.java @@ -2,7 +2,7 @@ import static org.assertj.core.api.Assertions.assertThat; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.location.domain.Location; import com.somemore.location.dto.request.LocationUpdateRequestDto; import com.somemore.location.repository.LocationRepository; diff --git a/src/test/java/com/somemore/location/service/query/LocationQueryServiceTest.java b/src/test/java/com/somemore/location/service/query/LocationQueryServiceTest.java index 9b22ae52f..364019993 100644 --- a/src/test/java/com/somemore/location/service/query/LocationQueryServiceTest.java +++ b/src/test/java/com/somemore/location/service/query/LocationQueryServiceTest.java @@ -4,7 +4,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.global.exception.BadRequestException; import com.somemore.location.domain.Location; import com.somemore.location.repository.LocationRepository; diff --git a/src/test/java/com/somemore/note/controller/NoteCommandApiControllerTest.java b/src/test/java/com/somemore/note/controller/NoteCommandApiControllerTest.java index cd0103352..248ab6f7b 100644 --- a/src/test/java/com/somemore/note/controller/NoteCommandApiControllerTest.java +++ b/src/test/java/com/somemore/note/controller/NoteCommandApiControllerTest.java @@ -1,7 +1,7 @@ package com.somemore.note.controller; -import com.somemore.ControllerTestSupport; -import com.somemore.WithMockCustomUser; +import com.somemore.support.ControllerTestSupport; +import com.somemore.support.annotation.WithMockCustomUser; import com.somemore.note.dto.SendNoteToCenterRequestDto; import com.somemore.note.dto.SendNoteToVolunteerRequestDto; import com.somemore.note.usecase.SendNoteToCenterUseCase; diff --git a/src/test/java/com/somemore/note/controller/NoteQueryApiControllerTest.java b/src/test/java/com/somemore/note/controller/NoteQueryApiControllerTest.java index 235c63dd1..6582b1032 100644 --- a/src/test/java/com/somemore/note/controller/NoteQueryApiControllerTest.java +++ b/src/test/java/com/somemore/note/controller/NoteQueryApiControllerTest.java @@ -1,7 +1,7 @@ package com.somemore.note.controller; -import com.somemore.ControllerTestSupport; -import com.somemore.WithMockCustomUser; +import com.somemore.support.ControllerTestSupport; +import com.somemore.support.annotation.WithMockCustomUser; import com.somemore.global.exception.NoSuchElementException; import com.somemore.note.repository.mapper.NoteDetailViewForCenter; import com.somemore.note.repository.mapper.NoteDetailViewForVolunteer; @@ -229,4 +229,4 @@ void getNoteDetailForVolunteer_NotFound() throws Exception { .andExpect(jsonPath("$.detail").value("존재하지 않는 쪽지입니다.")); } -} \ No newline at end of file +} diff --git a/src/test/java/com/somemore/note/repository/NoteRepositoryImplTest.java b/src/test/java/com/somemore/note/repository/NoteRepositoryImplTest.java index 4ff096cff..2dba222c6 100644 --- a/src/test/java/com/somemore/note/repository/NoteRepositoryImplTest.java +++ b/src/test/java/com/somemore/note/repository/NoteRepositoryImplTest.java @@ -1,6 +1,6 @@ package com.somemore.note.repository; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.Center; import com.somemore.center.repository.center.CenterJpaRepository; import com.somemore.note.domain.Note; @@ -21,7 +21,7 @@ import java.util.Optional; import java.util.UUID; -import static com.somemore.auth.oauth.OAuthProvider.NAVER; +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; import static org.assertj.core.api.Assertions.assertThat; @Transactional diff --git a/src/test/java/com/somemore/note/service/NoteMarkAsReadServiceTest.java b/src/test/java/com/somemore/note/service/NoteMarkAsReadServiceTest.java index 6c91ed88d..bc2cfc594 100644 --- a/src/test/java/com/somemore/note/service/NoteMarkAsReadServiceTest.java +++ b/src/test/java/com/somemore/note/service/NoteMarkAsReadServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.note.service; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.global.exception.NoSuchElementException; import com.somemore.note.domain.Note; import com.somemore.note.repository.NoteRepository; diff --git a/src/test/java/com/somemore/note/service/NoteQueryServiceTest.java b/src/test/java/com/somemore/note/service/NoteQueryServiceTest.java index 43418f685..2b225c17f 100644 --- a/src/test/java/com/somemore/note/service/NoteQueryServiceTest.java +++ b/src/test/java/com/somemore/note/service/NoteQueryServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.note.service; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.Center; import com.somemore.center.repository.center.CenterJpaRepository; import com.somemore.global.exception.NoSuchElementException; @@ -22,7 +22,7 @@ import java.util.UUID; -import static com.somemore.auth.oauth.OAuthProvider.NAVER; +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_NOTE; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; diff --git a/src/test/java/com/somemore/note/service/SendNoteToCenterServiceTest.java b/src/test/java/com/somemore/note/service/SendNoteToCenterServiceTest.java index 69e8cea45..ff71d7409 100644 --- a/src/test/java/com/somemore/note/service/SendNoteToCenterServiceTest.java +++ b/src/test/java/com/somemore/note/service/SendNoteToCenterServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.note.service; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.Center; import com.somemore.center.repository.center.CenterRepository; import com.somemore.global.exception.BadRequestException; diff --git a/src/test/java/com/somemore/note/service/SendNoteToVolunteerServiceTest.java b/src/test/java/com/somemore/note/service/SendNoteToVolunteerServiceTest.java index 9191ffee4..ff15ce204 100644 --- a/src/test/java/com/somemore/note/service/SendNoteToVolunteerServiceTest.java +++ b/src/test/java/com/somemore/note/service/SendNoteToVolunteerServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.note.service; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.note.domain.Note; import com.somemore.note.dto.SendNoteToVolunteerRequestDto; import com.somemore.note.repository.NoteJpaRepository; @@ -13,7 +13,7 @@ import java.util.UUID; -import static com.somemore.auth.oauth.OAuthProvider.NAVER; +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; import static org.junit.jupiter.api.Assertions.*; @Transactional @@ -56,4 +56,4 @@ private Volunteer createVolunteer() { Volunteer volunteer = Volunteer.createDefault(NAVER, "r1frewgergw"); return volunteerJpaRepository.save(volunteer); } -} \ No newline at end of file +} diff --git a/src/test/java/com/somemore/notification/converter/NotificationMessageConverterTest.java b/src/test/java/com/somemore/notification/converter/NotificationMessageConverterTest.java index 325970600..fb06fd02d 100644 --- a/src/test/java/com/somemore/notification/converter/NotificationMessageConverterTest.java +++ b/src/test/java/com/somemore/notification/converter/NotificationMessageConverterTest.java @@ -1,6 +1,6 @@ package com.somemore.notification.converter; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.notification.domain.Notification; import com.somemore.notification.domain.NotificationSubType; import com.somemore.notification.event.converter.NotificationMessageConverter; diff --git a/src/test/java/com/somemore/notification/handler/NotificationHandlerTest.java b/src/test/java/com/somemore/notification/handler/NotificationHandlerTest.java index 8e736d48c..a982fc8ae 100644 --- a/src/test/java/com/somemore/notification/handler/NotificationHandlerTest.java +++ b/src/test/java/com/somemore/notification/handler/NotificationHandlerTest.java @@ -1,6 +1,6 @@ package com.somemore.notification.handler; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.notification.event.converter.NotificationMessageConverter; import com.somemore.notification.domain.Notification; import com.somemore.notification.domain.NotificationSubType; diff --git a/src/test/java/com/somemore/notification/repository/NotificationRepositoryTest.java b/src/test/java/com/somemore/notification/repository/NotificationRepositoryTest.java index 33acb7266..d0eb36da1 100644 --- a/src/test/java/com/somemore/notification/repository/NotificationRepositoryTest.java +++ b/src/test/java/com/somemore/notification/repository/NotificationRepositoryTest.java @@ -1,6 +1,6 @@ package com.somemore.notification.repository; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.notification.domain.Notification; import com.somemore.notification.domain.NotificationSubType; import org.junit.jupiter.api.BeforeEach; diff --git a/src/test/java/com/somemore/notification/service/NotificationCommandServiceTest.java b/src/test/java/com/somemore/notification/service/NotificationCommandServiceTest.java index 1a5cf832b..7cf6e8789 100644 --- a/src/test/java/com/somemore/notification/service/NotificationCommandServiceTest.java +++ b/src/test/java/com/somemore/notification/service/NotificationCommandServiceTest.java @@ -5,7 +5,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.global.exception.BadRequestException; import com.somemore.notification.domain.Notification; import com.somemore.notification.domain.NotificationSubType; @@ -130,4 +130,4 @@ private Notification createNotification(UUID receiverId) { .relatedId(1L) .build(); } -} \ No newline at end of file +} diff --git a/src/test/java/com/somemore/notification/service/NotificationQueryServiceTest.java b/src/test/java/com/somemore/notification/service/NotificationQueryServiceTest.java index 761f87a4f..2167a7d44 100644 --- a/src/test/java/com/somemore/notification/service/NotificationQueryServiceTest.java +++ b/src/test/java/com/somemore/notification/service/NotificationQueryServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.notification.service; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.notification.domain.Notification; import com.somemore.notification.domain.NotificationSubType; import com.somemore.notification.dto.NotificationResponseDto; diff --git a/src/test/java/com/somemore/recruitboard/controller/RecruitBoardCommandApiControllerTest.java b/src/test/java/com/somemore/recruitboard/controller/RecruitBoardCommandApiControllerTest.java index 1c823af92..541fa650a 100644 --- a/src/test/java/com/somemore/recruitboard/controller/RecruitBoardCommandApiControllerTest.java +++ b/src/test/java/com/somemore/recruitboard/controller/RecruitBoardCommandApiControllerTest.java @@ -1,6 +1,6 @@ package com.somemore.recruitboard.controller; -import static com.somemore.common.fixture.LocalDateTimeFixture.createStartDateTime; +import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; import static com.somemore.recruitboard.domain.RecruitStatus.CLOSED; import static com.somemore.recruitboard.domain.VolunteerCategory.*; import static org.mockito.ArgumentMatchers.any; @@ -17,12 +17,11 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import com.fasterxml.jackson.databind.ObjectMapper; -import com.somemore.ControllerTestSupport; -import com.somemore.WithMockCustomUser; -import com.somemore.imageupload.usecase.ImageUploadUseCase; +import com.somemore.support.ControllerTestSupport; +import com.somemore.support.annotation.WithMockCustomUser; +import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import com.somemore.location.dto.request.LocationCreateRequestDto; import com.somemore.recruitboard.domain.RecruitStatus; -import com.somemore.recruitboard.domain.VolunteerCategory; import com.somemore.recruitboard.dto.request.RecruitBoardCreateRequestDto; import com.somemore.recruitboard.dto.request.RecruitBoardLocationUpdateRequestDto; import com.somemore.recruitboard.dto.request.RecruitBoardStatusUpdateRequestDto; diff --git a/src/test/java/com/somemore/recruitboard/controller/RecruitBoardQueryApiControllerTest.java b/src/test/java/com/somemore/recruitboard/controller/RecruitBoardQueryApiControllerTest.java index a637acf7e..dab35e54c 100644 --- a/src/test/java/com/somemore/recruitboard/controller/RecruitBoardQueryApiControllerTest.java +++ b/src/test/java/com/somemore/recruitboard/controller/RecruitBoardQueryApiControllerTest.java @@ -10,7 +10,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -import com.somemore.ControllerTestSupport; +import com.somemore.support.ControllerTestSupport; import com.somemore.recruitboard.dto.condition.RecruitBoardNearByCondition; import com.somemore.recruitboard.dto.condition.RecruitBoardSearchCondition; import com.somemore.recruitboard.dto.response.RecruitBoardDetailResponseDto; @@ -152,4 +152,4 @@ void getRecruitBoardsByCenterId() throws Exception { verify(recruitBoardQueryUseCase, times(1)).getRecruitBoardsByCenterId(eq(centerId), any(RecruitBoardSearchCondition.class)); } -} \ No newline at end of file +} diff --git a/src/test/java/com/somemore/recruitboard/controller/RecruitBoardSearchApiControllerTest.java b/src/test/java/com/somemore/recruitboard/controller/RecruitBoardSearchApiControllerTest.java index 6f4c89dfd..5aa1d0fdf 100644 --- a/src/test/java/com/somemore/recruitboard/controller/RecruitBoardSearchApiControllerTest.java +++ b/src/test/java/com/somemore/recruitboard/controller/RecruitBoardSearchApiControllerTest.java @@ -1,6 +1,6 @@ //package com.somemore.recruitboard.controller; // -//import com.somemore.ControllerTestSupport; +//import com.somemore.support.ControllerTestSupport; //import com.somemore.recruitboard.dto.condition.RecruitBoardNearByCondition; //import com.somemore.recruitboard.dto.condition.RecruitBoardSearchCondition; //import com.somemore.recruitboard.dto.response.RecruitBoardDetailResponseDto; diff --git a/src/test/java/com/somemore/recruitboard/domain/RecruitBoardTest.java b/src/test/java/com/somemore/recruitboard/domain/RecruitBoardTest.java index 35f47a461..16c29a37c 100644 --- a/src/test/java/com/somemore/recruitboard/domain/RecruitBoardTest.java +++ b/src/test/java/com/somemore/recruitboard/domain/RecruitBoardTest.java @@ -1,9 +1,9 @@ package com.somemore.recruitboard.domain; -import static com.somemore.common.fixture.LocalDateTimeFixture.createCurrentDateTime; -import static com.somemore.common.fixture.LocalDateTimeFixture.createStartDateTime; -import static com.somemore.common.fixture.LocalDateTimeFixture.createUpdateStartDateTime; -import static com.somemore.common.fixture.RecruitBoardFixture.createRecruitBoard; +import static com.somemore.support.fixture.LocalDateTimeFixture.createCurrentDateTime; +import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; +import static com.somemore.support.fixture.LocalDateTimeFixture.createUpdateStartDateTime; +import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; import static com.somemore.recruitboard.domain.RecruitStatus.CLOSED; import static com.somemore.recruitboard.domain.RecruitStatus.COMPLETED; import static com.somemore.recruitboard.domain.RecruitStatus.RECRUITING; diff --git a/src/test/java/com/somemore/recruitboard/domain/RecruitmentInfoTest.java b/src/test/java/com/somemore/recruitboard/domain/RecruitmentInfoTest.java index b2c62ec0f..b692cc153 100644 --- a/src/test/java/com/somemore/recruitboard/domain/RecruitmentInfoTest.java +++ b/src/test/java/com/somemore/recruitboard/domain/RecruitmentInfoTest.java @@ -1,7 +1,7 @@ package com.somemore.recruitboard.domain; -import static com.somemore.common.fixture.LocalDateTimeFixture.createStartDateTime; -import static com.somemore.common.fixture.LocalDateTimeFixture.createUpdateStartDateTime; +import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; +import static com.somemore.support.fixture.LocalDateTimeFixture.createUpdateStartDateTime; import static com.somemore.recruitboard.domain.VolunteerCategory.ADMINISTRATIVE_SUPPORT; import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; import static com.somemore.recruitboard.domain.VolunteerCategory.SAFETY_PREVENTION; diff --git a/src/test/java/com/somemore/recruitboard/repository/RecruitBoardDocumentRepositoryTest.java b/src/test/java/com/somemore/recruitboard/repository/RecruitBoardDocumentRepositoryTest.java index 8c57c7098..9e5f59db2 100644 --- a/src/test/java/com/somemore/recruitboard/repository/RecruitBoardDocumentRepositoryTest.java +++ b/src/test/java/com/somemore/recruitboard/repository/RecruitBoardDocumentRepositoryTest.java @@ -1,6 +1,6 @@ //package com.somemore.recruitboard.repository; // -//import com.somemore.IntegrationTestSupport; +//import com.somemore.support.IntegrationTestSupport; //import com.somemore.center.domain.Center; //import com.somemore.center.repository.center.CenterRepository; //import com.somemore.location.domain.Location; diff --git a/src/test/java/com/somemore/recruitboard/repository/RecruitBoardRepositoryImplTest.java b/src/test/java/com/somemore/recruitboard/repository/RecruitBoardRepositoryImplTest.java index 8c65f0ebc..d992f25bf 100644 --- a/src/test/java/com/somemore/recruitboard/repository/RecruitBoardRepositoryImplTest.java +++ b/src/test/java/com/somemore/recruitboard/repository/RecruitBoardRepositoryImplTest.java @@ -1,15 +1,15 @@ package com.somemore.recruitboard.repository; -import static com.somemore.common.fixture.CenterFixture.createCenter; -import static com.somemore.common.fixture.LocalDateTimeFixture.createCurrentDateTime; -import static com.somemore.common.fixture.LocationFixture.createLocation; -import static com.somemore.common.fixture.RecruitBoardFixture.createCompletedRecruitBoard; -import static com.somemore.common.fixture.RecruitBoardFixture.createRecruitBoard; +import static com.somemore.support.fixture.CenterFixture.createCenter; +import static com.somemore.support.fixture.LocalDateTimeFixture.createCurrentDateTime; +import static com.somemore.support.fixture.LocationFixture.createLocation; +import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; +import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; import static com.somemore.recruitboard.domain.RecruitStatus.CLOSED; import static com.somemore.recruitboard.domain.VolunteerCategory.ADMINISTRATIVE_SUPPORT; import static org.assertj.core.api.Assertions.assertThat; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.Center; import com.somemore.center.repository.center.CenterRepository; import com.somemore.location.domain.Location; diff --git a/src/test/java/com/somemore/recruitboard/scheduler/RecruitBoardUpdateSchedulerTest.java b/src/test/java/com/somemore/recruitboard/scheduler/RecruitBoardUpdateSchedulerTest.java index 60bfa8cf7..69510db40 100644 --- a/src/test/java/com/somemore/recruitboard/scheduler/RecruitBoardUpdateSchedulerTest.java +++ b/src/test/java/com/somemore/recruitboard/scheduler/RecruitBoardUpdateSchedulerTest.java @@ -1,6 +1,6 @@ //package com.somemore.recruitboard.scheduler; // -//import com.somemore.IntegrationTestSupport; +//import com.somemore.support.IntegrationTestSupport; //import com.somemore.recruitboard.dto.condition.RecruitBoardSearchCondition; //import com.somemore.recruitboard.repository.RecruitBoardRepository; //import com.somemore.recruitboard.repository.mapper.RecruitBoardWithCenter; @@ -57,4 +57,4 @@ // Sort sort = Sort.by(Sort.Order.desc("created_at")); // return PageRequest.of(0, 5, sort); // } -//} \ No newline at end of file +//} diff --git a/src/test/java/com/somemore/recruitboard/service/command/CreateRecruitBoardServiceTest.java b/src/test/java/com/somemore/recruitboard/service/command/CreateRecruitBoardServiceTest.java index 4ccf311aa..1fa931a90 100644 --- a/src/test/java/com/somemore/recruitboard/service/command/CreateRecruitBoardServiceTest.java +++ b/src/test/java/com/somemore/recruitboard/service/command/CreateRecruitBoardServiceTest.java @@ -1,10 +1,10 @@ package com.somemore.recruitboard.service.command; -import static com.somemore.common.fixture.LocalDateTimeFixture.createStartDateTime; +import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; import static org.assertj.core.api.Assertions.assertThat; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.location.dto.request.LocationCreateRequestDto; import com.somemore.location.repository.LocationRepository; import com.somemore.recruitboard.domain.RecruitBoard; diff --git a/src/test/java/com/somemore/recruitboard/service/command/DeleteRecruitBoardServiceTest.java b/src/test/java/com/somemore/recruitboard/service/command/DeleteRecruitBoardServiceTest.java index 8a7a13244..6d783ebea 100644 --- a/src/test/java/com/somemore/recruitboard/service/command/DeleteRecruitBoardServiceTest.java +++ b/src/test/java/com/somemore/recruitboard/service/command/DeleteRecruitBoardServiceTest.java @@ -1,11 +1,11 @@ package com.somemore.recruitboard.service.command; -import static com.somemore.common.fixture.LocalDateTimeFixture.createStartDateTime; +import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.global.exception.BadRequestException; import com.somemore.recruitboard.domain.RecruitBoard; import com.somemore.recruitboard.domain.RecruitmentInfo; diff --git a/src/test/java/com/somemore/recruitboard/service/command/UpdateRecruitBoardServiceTest.java b/src/test/java/com/somemore/recruitboard/service/command/UpdateRecruitBoardServiceTest.java index c2e558271..5873da8d3 100644 --- a/src/test/java/com/somemore/recruitboard/service/command/UpdateRecruitBoardServiceTest.java +++ b/src/test/java/com/somemore/recruitboard/service/command/UpdateRecruitBoardServiceTest.java @@ -1,13 +1,13 @@ package com.somemore.recruitboard.service.command; -import static com.somemore.common.fixture.LocalDateTimeFixture.createCurrentDateTime; -import static com.somemore.common.fixture.LocalDateTimeFixture.createStartDateTime; -import static com.somemore.common.fixture.LocalDateTimeFixture.createUpdateStartDateTime; +import static com.somemore.support.fixture.LocalDateTimeFixture.createCurrentDateTime; +import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; +import static com.somemore.support.fixture.LocalDateTimeFixture.createUpdateStartDateTime; import static com.somemore.recruitboard.domain.VolunteerCategory.ADMINISTRATIVE_SUPPORT; import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; import static org.assertj.core.api.Assertions.assertThat; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.global.exception.BadRequestException; import com.somemore.location.domain.Location; import com.somemore.location.repository.LocationRepository; diff --git a/src/test/java/com/somemore/recruitboard/service/query/RecruitBoardDocumentServiceTest.java b/src/test/java/com/somemore/recruitboard/service/query/RecruitBoardDocumentServiceTest.java index 67f945f17..04b498bd7 100644 --- a/src/test/java/com/somemore/recruitboard/service/query/RecruitBoardDocumentServiceTest.java +++ b/src/test/java/com/somemore/recruitboard/service/query/RecruitBoardDocumentServiceTest.java @@ -1,6 +1,6 @@ //package com.somemore.recruitboard.service.query; // -//import com.somemore.IntegrationTestSupport; +//import com.somemore.support.IntegrationTestSupport; //import com.somemore.center.domain.Center; //import com.somemore.center.repository.center.CenterRepository; //import com.somemore.location.domain.Location; diff --git a/src/test/java/com/somemore/recruitboard/service/query/RecruitBoardQueryServiceTest.java b/src/test/java/com/somemore/recruitboard/service/query/RecruitBoardQueryServiceTest.java index 32c0ede4a..d224baf5f 100644 --- a/src/test/java/com/somemore/recruitboard/service/query/RecruitBoardQueryServiceTest.java +++ b/src/test/java/com/somemore/recruitboard/service/query/RecruitBoardQueryServiceTest.java @@ -1,16 +1,16 @@ package com.somemore.recruitboard.service.query; -import static com.somemore.common.fixture.CenterFixture.createCenter; -import static com.somemore.common.fixture.LocalDateTimeFixture.createCurrentDateTime; -import static com.somemore.common.fixture.LocationFixture.createLocation; -import static com.somemore.common.fixture.RecruitBoardFixture.createCompletedRecruitBoard; -import static com.somemore.common.fixture.RecruitBoardFixture.createRecruitBoard; +import static com.somemore.support.fixture.CenterFixture.createCenter; +import static com.somemore.support.fixture.LocalDateTimeFixture.createCurrentDateTime; +import static com.somemore.support.fixture.LocationFixture.createLocation; +import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; +import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_CENTER; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_RECRUIT_BOARD; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.Center; import com.somemore.center.repository.center.CenterRepository; import com.somemore.global.exception.BadRequestException; @@ -26,7 +26,6 @@ import com.somemore.recruitboard.dto.response.RecruitBoardWithLocationResponseDto; import com.somemore.recruitboard.repository.RecruitBoardRepository; -import java.util.ArrayList; import java.util.List; import java.util.UUID; import org.junit.jupiter.api.BeforeEach; diff --git a/src/test/java/com/somemore/review/controller/ReviewCommandApiControllerTest.java b/src/test/java/com/somemore/review/controller/ReviewCommandApiControllerTest.java index 2e7b1487c..9c4fd5f01 100644 --- a/src/test/java/com/somemore/review/controller/ReviewCommandApiControllerTest.java +++ b/src/test/java/com/somemore/review/controller/ReviewCommandApiControllerTest.java @@ -9,9 +9,9 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import com.fasterxml.jackson.databind.ObjectMapper; -import com.somemore.ControllerTestSupport; -import com.somemore.WithMockCustomUser; -import com.somemore.imageupload.usecase.ImageUploadUseCase; +import com.somemore.support.ControllerTestSupport; +import com.somemore.support.annotation.WithMockCustomUser; +import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import com.somemore.review.dto.request.ReviewCreateRequestDto; import com.somemore.review.usecase.CreateReviewUseCase; import java.util.UUID; diff --git a/src/test/java/com/somemore/review/repository/ReviewRepositoryImplTest.java b/src/test/java/com/somemore/review/repository/ReviewRepositoryImplTest.java index 2f3949c87..6924bda55 100644 --- a/src/test/java/com/somemore/review/repository/ReviewRepositoryImplTest.java +++ b/src/test/java/com/somemore/review/repository/ReviewRepositoryImplTest.java @@ -1,15 +1,15 @@ package com.somemore.review.repository; -import static com.somemore.auth.oauth.OAuthProvider.NAVER; -import static com.somemore.common.fixture.CenterFixture.createCenter; -import static com.somemore.common.fixture.RecruitBoardFixture.createCompletedRecruitBoard; +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; +import static com.somemore.support.fixture.CenterFixture.createCenter; +import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; import static com.somemore.recruitboard.domain.VolunteerCategory.COUNSELING; import static com.somemore.recruitboard.domain.VolunteerCategory.CULTURAL_EVENT; import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; import static org.assertj.core.api.Assertions.assertThat; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.Center; import com.somemore.center.repository.center.CenterRepository; import com.somemore.recruitboard.domain.RecruitBoard; diff --git a/src/test/java/com/somemore/review/service/CreateReviewServiceTest.java b/src/test/java/com/somemore/review/service/CreateReviewServiceTest.java index 3b7ec75d6..c6c7fdb9c 100644 --- a/src/test/java/com/somemore/review/service/CreateReviewServiceTest.java +++ b/src/test/java/com/somemore/review/service/CreateReviewServiceTest.java @@ -6,7 +6,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.global.exception.BadRequestException; import com.somemore.review.domain.Review; import com.somemore.review.dto.request.ReviewCreateRequestDto; diff --git a/src/test/java/com/somemore/review/service/ReviewQueryServiceTest.java b/src/test/java/com/somemore/review/service/ReviewQueryServiceTest.java index 943df8c0d..86028b96d 100644 --- a/src/test/java/com/somemore/review/service/ReviewQueryServiceTest.java +++ b/src/test/java/com/somemore/review/service/ReviewQueryServiceTest.java @@ -1,8 +1,8 @@ package com.somemore.review.service; -import static com.somemore.auth.oauth.OAuthProvider.NAVER; -import static com.somemore.common.fixture.CenterFixture.createCenter; -import static com.somemore.common.fixture.RecruitBoardFixture.createCompletedRecruitBoard; +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; +import static com.somemore.support.fixture.CenterFixture.createCenter; +import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; import static com.somemore.global.exception.ExceptionMessage.NOT_EXISTS_REVIEW; import static com.somemore.recruitboard.domain.VolunteerCategory.COUNSELING; import static com.somemore.recruitboard.domain.VolunteerCategory.CULTURAL_EVENT; @@ -12,7 +12,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.assertj.core.api.AssertionsForClassTypes.tuple; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.center.domain.Center; import com.somemore.center.repository.center.CenterRepository; import com.somemore.global.exception.BadRequestException; diff --git a/src/test/java/com/somemore/ControllerTestSupport.java b/src/test/java/com/somemore/support/ControllerTestSupport.java similarity index 95% rename from src/test/java/com/somemore/ControllerTestSupport.java rename to src/test/java/com/somemore/support/ControllerTestSupport.java index 832bad10c..4edfe5bc7 100644 --- a/src/test/java/com/somemore/ControllerTestSupport.java +++ b/src/test/java/com/somemore/support/ControllerTestSupport.java @@ -1,4 +1,4 @@ -package com.somemore; +package com.somemore.support; import com.fasterxml.jackson.databind.ObjectMapper; diff --git a/src/test/java/com/somemore/IntegrationTestSupport.java b/src/test/java/com/somemore/support/IntegrationTestSupport.java similarity index 91% rename from src/test/java/com/somemore/IntegrationTestSupport.java rename to src/test/java/com/somemore/support/IntegrationTestSupport.java index 842b0d708..39ac27c91 100644 --- a/src/test/java/com/somemore/IntegrationTestSupport.java +++ b/src/test/java/com/somemore/support/IntegrationTestSupport.java @@ -1,4 +1,4 @@ -package com.somemore; +package com.somemore.support; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; diff --git a/src/test/java/com/somemore/CustomSecurityContextFactory.java b/src/test/java/com/somemore/support/annotation/CustomSecurityContextFactory.java similarity index 96% rename from src/test/java/com/somemore/CustomSecurityContextFactory.java rename to src/test/java/com/somemore/support/annotation/CustomSecurityContextFactory.java index 3884f81af..d56869147 100644 --- a/src/test/java/com/somemore/CustomSecurityContextFactory.java +++ b/src/test/java/com/somemore/support/annotation/CustomSecurityContextFactory.java @@ -1,4 +1,4 @@ -package com.somemore; +package com.somemore.support.annotation; import java.util.Collections; import java.util.UUID; diff --git a/src/test/java/com/somemore/WithMockCustomUser.java b/src/test/java/com/somemore/support/annotation/WithMockCustomUser.java similarity index 91% rename from src/test/java/com/somemore/WithMockCustomUser.java rename to src/test/java/com/somemore/support/annotation/WithMockCustomUser.java index 1280ddbbd..bceb29681 100644 --- a/src/test/java/com/somemore/WithMockCustomUser.java +++ b/src/test/java/com/somemore/support/annotation/WithMockCustomUser.java @@ -1,4 +1,4 @@ -package com.somemore; +package com.somemore.support.annotation; import org.springframework.security.test.context.support.WithSecurityContext; diff --git a/src/test/java/com/somemore/common/fixture/CenterFixture.java b/src/test/java/com/somemore/support/fixture/CenterFixture.java similarity index 96% rename from src/test/java/com/somemore/common/fixture/CenterFixture.java rename to src/test/java/com/somemore/support/fixture/CenterFixture.java index 078b5ddb7..3e6186a09 100644 --- a/src/test/java/com/somemore/common/fixture/CenterFixture.java +++ b/src/test/java/com/somemore/support/fixture/CenterFixture.java @@ -1,4 +1,4 @@ -package com.somemore.common.fixture; +package com.somemore.support.fixture; import com.somemore.center.domain.Center; diff --git a/src/test/java/com/somemore/common/fixture/CommunityBoardFixture.java b/src/test/java/com/somemore/support/fixture/CommunityBoardFixture.java similarity index 97% rename from src/test/java/com/somemore/common/fixture/CommunityBoardFixture.java rename to src/test/java/com/somemore/support/fixture/CommunityBoardFixture.java index 4856e49a9..35f657ae8 100644 --- a/src/test/java/com/somemore/common/fixture/CommunityBoardFixture.java +++ b/src/test/java/com/somemore/support/fixture/CommunityBoardFixture.java @@ -1,4 +1,4 @@ -package com.somemore.common.fixture; +package com.somemore.support.fixture; import com.somemore.community.domain.CommunityBoard; diff --git a/src/test/java/com/somemore/common/fixture/CommunityCommentFixture.java b/src/test/java/com/somemore/support/fixture/CommunityCommentFixture.java similarity index 97% rename from src/test/java/com/somemore/common/fixture/CommunityCommentFixture.java rename to src/test/java/com/somemore/support/fixture/CommunityCommentFixture.java index 113c5d868..a7572c945 100644 --- a/src/test/java/com/somemore/common/fixture/CommunityCommentFixture.java +++ b/src/test/java/com/somemore/support/fixture/CommunityCommentFixture.java @@ -1,4 +1,4 @@ -package com.somemore.common.fixture; +package com.somemore.support.fixture; import com.somemore.community.domain.CommunityComment; diff --git a/src/test/java/com/somemore/common/fixture/LocalDateTimeFixture.java b/src/test/java/com/somemore/support/fixture/LocalDateTimeFixture.java similarity index 95% rename from src/test/java/com/somemore/common/fixture/LocalDateTimeFixture.java rename to src/test/java/com/somemore/support/fixture/LocalDateTimeFixture.java index 29d622f8b..263cbe0aa 100644 --- a/src/test/java/com/somemore/common/fixture/LocalDateTimeFixture.java +++ b/src/test/java/com/somemore/support/fixture/LocalDateTimeFixture.java @@ -1,4 +1,4 @@ -package com.somemore.common.fixture; +package com.somemore.support.fixture; import java.time.LocalDateTime; diff --git a/src/test/java/com/somemore/common/fixture/LocationFixture.java b/src/test/java/com/somemore/support/fixture/LocationFixture.java similarity index 96% rename from src/test/java/com/somemore/common/fixture/LocationFixture.java rename to src/test/java/com/somemore/support/fixture/LocationFixture.java index abe00a4f9..ebcd736d8 100644 --- a/src/test/java/com/somemore/common/fixture/LocationFixture.java +++ b/src/test/java/com/somemore/support/fixture/LocationFixture.java @@ -1,4 +1,4 @@ -package com.somemore.common.fixture; +package com.somemore.support.fixture; import com.somemore.location.domain.Location; import java.math.BigDecimal; diff --git a/src/test/java/com/somemore/common/fixture/RecruitBoardFixture.java b/src/test/java/com/somemore/support/fixture/RecruitBoardFixture.java similarity index 99% rename from src/test/java/com/somemore/common/fixture/RecruitBoardFixture.java rename to src/test/java/com/somemore/support/fixture/RecruitBoardFixture.java index 49fff9c33..bd44bd088 100644 --- a/src/test/java/com/somemore/common/fixture/RecruitBoardFixture.java +++ b/src/test/java/com/somemore/support/fixture/RecruitBoardFixture.java @@ -1,6 +1,6 @@ -package com.somemore.common.fixture; +package com.somemore.support.fixture; -import static com.somemore.common.fixture.LocalDateTimeFixture.createStartDateTime; +import static com.somemore.support.fixture.LocalDateTimeFixture.createStartDateTime; import static com.somemore.recruitboard.domain.RecruitStatus.CLOSED; import static com.somemore.recruitboard.domain.RecruitStatus.COMPLETED; import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; diff --git a/src/test/java/com/somemore/volunteer/controller/VolunteerProfileCommandControllerTest.java b/src/test/java/com/somemore/volunteer/controller/VolunteerProfileCommandControllerTest.java index 4372fae9b..0f3049f59 100644 --- a/src/test/java/com/somemore/volunteer/controller/VolunteerProfileCommandControllerTest.java +++ b/src/test/java/com/somemore/volunteer/controller/VolunteerProfileCommandControllerTest.java @@ -2,9 +2,9 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; -import com.somemore.ControllerTestSupport; -import com.somemore.WithMockCustomUser; -import com.somemore.imageupload.usecase.ImageUploadUseCase; +import com.somemore.support.ControllerTestSupport; +import com.somemore.support.annotation.WithMockCustomUser; +import com.somemore.global.imageupload.usecase.ImageUploadUseCase; import com.somemore.volunteer.dto.request.VolunteerProfileUpdateRequestDto; import com.somemore.volunteer.usecase.UpdateVolunteerProfileUseCase; import org.junit.jupiter.api.DisplayName; @@ -13,7 +13,6 @@ import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.MediaType; import org.springframework.mock.web.MockMultipartFile; -import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.request.MockMultipartHttpServletRequestBuilder; import java.nio.charset.StandardCharsets; @@ -176,4 +175,4 @@ private MockMultipartHttpServletRequestBuilder createMockRequestBuilder() { }); return builder; } -} \ No newline at end of file +} diff --git a/src/test/java/com/somemore/volunteer/domain/VolunteerTest.java b/src/test/java/com/somemore/volunteer/domain/VolunteerTest.java index 5d1d7b586..03f94f3dd 100644 --- a/src/test/java/com/somemore/volunteer/domain/VolunteerTest.java +++ b/src/test/java/com/somemore/volunteer/domain/VolunteerTest.java @@ -1,6 +1,6 @@ package com.somemore.volunteer.domain; -import static com.somemore.auth.oauth.OAuthProvider.NAVER; +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; import static org.assertj.core.api.Assertions.assertThat; import org.junit.jupiter.api.DisplayName; diff --git a/src/test/java/com/somemore/volunteer/repository/VolunteerDetailRepositoryImplTest.java b/src/test/java/com/somemore/volunteer/repository/VolunteerDetailRepositoryImplTest.java index 0f09c3b8a..5465c6410 100644 --- a/src/test/java/com/somemore/volunteer/repository/VolunteerDetailRepositoryImplTest.java +++ b/src/test/java/com/somemore/volunteer/repository/VolunteerDetailRepositoryImplTest.java @@ -1,6 +1,6 @@ package com.somemore.volunteer.repository; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.volunteer.domain.Gender; import com.somemore.volunteer.domain.VolunteerDetail; import org.junit.jupiter.api.DisplayName; @@ -63,4 +63,4 @@ private VolunteerDetail createVolunteerDetail(UUID volunteerId) { .contactNumber("010-1234-5678") .build(); } -} \ No newline at end of file +} diff --git a/src/test/java/com/somemore/volunteer/repository/VolunteerRepositoryTest.java b/src/test/java/com/somemore/volunteer/repository/VolunteerRepositoryTest.java index 9b8dd3e2c..f32fdf187 100644 --- a/src/test/java/com/somemore/volunteer/repository/VolunteerRepositoryTest.java +++ b/src/test/java/com/somemore/volunteer/repository/VolunteerRepositoryTest.java @@ -1,9 +1,9 @@ package com.somemore.volunteer.repository; -import static com.somemore.auth.oauth.OAuthProvider.NAVER; +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; import static org.assertj.core.api.Assertions.assertThat; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.volunteer.domain.Volunteer; import com.somemore.volunteer.domain.VolunteerDetail; import com.somemore.volunteer.dto.request.VolunteerRegisterRequestDto; diff --git a/src/test/java/com/somemore/volunteer/service/GenerateOAuthUrlServiceTest.java b/src/test/java/com/somemore/volunteer/service/GenerateOAuthUrlServiceTest.java index be5d20140..b3bc01975 100644 --- a/src/test/java/com/somemore/volunteer/service/GenerateOAuthUrlServiceTest.java +++ b/src/test/java/com/somemore/volunteer/service/GenerateOAuthUrlServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.volunteer.service; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -43,4 +43,4 @@ void generateUrl_ShouldReturnCorrectUrl_ForGoogle() { assertThat(result).isEqualTo(expectedUrl); } -} \ No newline at end of file +} diff --git a/src/test/java/com/somemore/volunteer/service/RegisterVolunteerServiceTest.java b/src/test/java/com/somemore/volunteer/service/RegisterVolunteerServiceTest.java index 804744903..92c1da486 100644 --- a/src/test/java/com/somemore/volunteer/service/RegisterVolunteerServiceTest.java +++ b/src/test/java/com/somemore/volunteer/service/RegisterVolunteerServiceTest.java @@ -1,7 +1,7 @@ package com.somemore.volunteer.service; -import com.somemore.IntegrationTestSupport; -import com.somemore.auth.oauth.OAuthProvider; +import com.somemore.support.IntegrationTestSupport; +import com.somemore.global.auth.oauth.OAuthProvider; import com.somemore.volunteer.domain.Gender; import com.somemore.volunteer.domain.Tier; import com.somemore.volunteer.domain.Volunteer; diff --git a/src/test/java/com/somemore/volunteer/service/SignOutVolunteerServiceTest.java b/src/test/java/com/somemore/volunteer/service/SignOutVolunteerServiceTest.java index 98e883ac3..750e73c8f 100644 --- a/src/test/java/com/somemore/volunteer/service/SignOutVolunteerServiceTest.java +++ b/src/test/java/com/somemore/volunteer/service/SignOutVolunteerServiceTest.java @@ -1,16 +1,16 @@ package com.somemore.volunteer.service; -import com.somemore.IntegrationTestSupport; -import com.somemore.auth.cookie.CookieUseCase; -import com.somemore.auth.jwt.domain.EncodedToken; -import com.somemore.auth.jwt.domain.TokenType; -import com.somemore.auth.jwt.domain.UserRole; -import com.somemore.auth.jwt.exception.JwtErrorType; -import com.somemore.auth.jwt.exception.JwtException; -import com.somemore.auth.jwt.generator.JwtGenerator; -import com.somemore.auth.jwt.refresh.domain.RefreshToken; -import com.somemore.auth.jwt.refresh.manager.RefreshTokenManager; -import com.somemore.auth.signout.service.SignOutService; +import com.somemore.support.IntegrationTestSupport; +import com.somemore.global.auth.cookie.CookieUseCase; +import com.somemore.global.auth.jwt.domain.EncodedToken; +import com.somemore.global.auth.jwt.domain.TokenType; +import com.somemore.global.auth.jwt.domain.UserRole; +import com.somemore.global.auth.jwt.exception.JwtErrorType; +import com.somemore.global.auth.jwt.exception.JwtException; +import com.somemore.global.auth.jwt.generator.JwtGenerator; +import com.somemore.global.auth.jwt.refresh.domain.RefreshToken; +import com.somemore.global.auth.jwt.refresh.manager.RefreshTokenManager; +import com.somemore.global.auth.signout.service.SignOutService; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; diff --git a/src/test/java/com/somemore/volunteer/service/UpdateVolunteerLockServiceTest.java b/src/test/java/com/somemore/volunteer/service/UpdateVolunteerLockServiceTest.java index e722534df..1b51f70ac 100644 --- a/src/test/java/com/somemore/volunteer/service/UpdateVolunteerLockServiceTest.java +++ b/src/test/java/com/somemore/volunteer/service/UpdateVolunteerLockServiceTest.java @@ -1,9 +1,9 @@ package com.somemore.volunteer.service; -import static com.somemore.auth.oauth.OAuthProvider.NAVER; +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; import static org.assertj.core.api.Assertions.assertThat; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.volunteer.domain.Volunteer; import com.somemore.volunteer.repository.VolunteerRepository; import java.util.UUID; diff --git a/src/test/java/com/somemore/volunteer/service/UpdateVolunteerProfileServiceTest.java b/src/test/java/com/somemore/volunteer/service/UpdateVolunteerProfileServiceTest.java index e7b84d27d..40f34dc59 100644 --- a/src/test/java/com/somemore/volunteer/service/UpdateVolunteerProfileServiceTest.java +++ b/src/test/java/com/somemore/volunteer/service/UpdateVolunteerProfileServiceTest.java @@ -1,7 +1,7 @@ package com.somemore.volunteer.service; -import com.somemore.IntegrationTestSupport; -import com.somemore.auth.oauth.OAuthProvider; +import com.somemore.support.IntegrationTestSupport; +import com.somemore.global.auth.oauth.OAuthProvider; import com.somemore.volunteer.domain.Volunteer; import com.somemore.volunteer.dto.request.VolunteerProfileUpdateRequestDto; import com.somemore.volunteer.repository.VolunteerRepository; @@ -61,4 +61,4 @@ void updateVolunteerProfileThrowsWhenNotFound() { .isInstanceOf(com.somemore.global.exception.BadRequestException.class) .hasMessage(NOT_EXISTS_VOLUNTEER.getMessage()); } -} \ No newline at end of file +} diff --git a/src/test/java/com/somemore/volunteer/service/VolunteerQueryServiceTest.java b/src/test/java/com/somemore/volunteer/service/VolunteerQueryServiceTest.java index 223375951..d9ef13f7e 100644 --- a/src/test/java/com/somemore/volunteer/service/VolunteerQueryServiceTest.java +++ b/src/test/java/com/somemore/volunteer/service/VolunteerQueryServiceTest.java @@ -7,8 +7,8 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.junit.jupiter.api.Assertions.*; -import com.somemore.IntegrationTestSupport; -import com.somemore.auth.oauth.OAuthProvider; +import com.somemore.support.IntegrationTestSupport; +import com.somemore.global.auth.oauth.OAuthProvider; import com.somemore.global.exception.BadRequestException; import com.somemore.volunteer.domain.Volunteer; import com.somemore.volunteer.domain.VolunteerDetail; diff --git a/src/test/java/com/somemore/facade/validator/VolunteerDetailAccessValidatorImplTest.java b/src/test/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidatorImplTest.java similarity index 86% rename from src/test/java/com/somemore/facade/validator/VolunteerDetailAccessValidatorImplTest.java rename to src/test/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidatorImplTest.java index 4a12684b6..47f6d209d 100644 --- a/src/test/java/com/somemore/facade/validator/VolunteerDetailAccessValidatorImplTest.java +++ b/src/test/java/com/somemore/volunteer/validator/VolunteerDetailAccessValidatorImplTest.java @@ -1,24 +1,23 @@ -package com.somemore.facade.validator; +package com.somemore.volunteer.validator; + +import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_VOLUNTEER_DETAIL; +import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; +import static org.assertj.core.api.Assertions.assertThatCode; +import static org.assertj.core.api.Assertions.assertThatThrownBy; -import com.somemore.IntegrationTestSupport; import com.somemore.global.exception.BadRequestException; import com.somemore.recruitboard.domain.RecruitBoard; import com.somemore.recruitboard.repository.RecruitBoardRepository; +import com.somemore.support.IntegrationTestSupport; import com.somemore.volunteerapply.domain.ApplyStatus; import com.somemore.volunteerapply.domain.VolunteerApply; import com.somemore.volunteerapply.repository.VolunteerApplyRepository; +import java.util.UUID; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; -import java.util.UUID; - -import static com.somemore.common.fixture.RecruitBoardFixture.createRecruitBoard; -import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_VOLUNTEER_DETAIL; -import static org.assertj.core.api.Assertions.assertThatCode; -import static org.assertj.core.api.Assertions.assertThatThrownBy; - @Transactional class VolunteerDetailAccessValidatorImplTest extends IntegrationTestSupport { @@ -43,15 +42,18 @@ void validateByCenterIdThrowsExceptionWhenVolunteerNotLinked() { UUID unrelatedVolunteerId = UUID.randomUUID(); UUID relatedVolunteerId = UUID.randomUUID(); - VolunteerApply volunteerApply = createVolunteerApply(recruitBoard.getId(), relatedVolunteerId); + VolunteerApply volunteerApply = createVolunteerApply(recruitBoard.getId(), + relatedVolunteerId); volunteerApplyRepository.save(volunteerApply); // when // then - assertThatCode(() -> volunteerDetailAccessValidatorImpl.validateByCenterId(centerId, relatedVolunteerId)) + assertThatCode(() -> volunteerDetailAccessValidatorImpl.validateByCenterId(centerId, + relatedVolunteerId)) .doesNotThrowAnyException(); - assertThatThrownBy(() -> volunteerDetailAccessValidatorImpl.validateByCenterId(centerId, unrelatedVolunteerId)) + assertThatThrownBy(() -> volunteerDetailAccessValidatorImpl.validateByCenterId(centerId, + unrelatedVolunteerId)) .isInstanceOf(BadRequestException.class) .hasMessage(UNAUTHORIZED_VOLUNTEER_DETAIL.getMessage()); } @@ -64,4 +66,4 @@ private VolunteerApply createVolunteerApply(Long recruitId, UUID volunteerId) { .attended(false) .build(); } -} \ No newline at end of file +} diff --git a/src/test/java/com/somemore/volunteerapply/controller/CenterVolunteerApplyCommandApiControllerTest.java b/src/test/java/com/somemore/volunteerapply/controller/CenterVolunteerApplyCommandApiControllerTest.java index 5939a4c74..9c55bec87 100644 --- a/src/test/java/com/somemore/volunteerapply/controller/CenterVolunteerApplyCommandApiControllerTest.java +++ b/src/test/java/com/somemore/volunteerapply/controller/CenterVolunteerApplyCommandApiControllerTest.java @@ -9,9 +9,9 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import com.fasterxml.jackson.databind.ObjectMapper; -import com.somemore.ControllerTestSupport; -import com.somemore.WithMockCustomUser; -import com.somemore.facade.volunteerapply.SettleVolunteerApplyFacadeUseCase; +import com.somemore.support.ControllerTestSupport; +import com.somemore.support.annotation.WithMockCustomUser; +import com.somemore.volunteerapply.usecase.SettleVolunteerApplyFacadeUseCase; import com.somemore.volunteerapply.dto.request.VolunteerApplySettleRequestDto; import com.somemore.volunteerapply.usecase.ApproveVolunteerApplyUseCase; import com.somemore.volunteerapply.usecase.RejectVolunteerApplyUseCase; diff --git a/src/test/java/com/somemore/volunteerapply/controller/VolunteerApplyCommandApiControllerTest.java b/src/test/java/com/somemore/volunteerapply/controller/VolunteerApplyCommandApiControllerTest.java index 1589ab277..53a9806a0 100644 --- a/src/test/java/com/somemore/volunteerapply/controller/VolunteerApplyCommandApiControllerTest.java +++ b/src/test/java/com/somemore/volunteerapply/controller/VolunteerApplyCommandApiControllerTest.java @@ -10,8 +10,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import com.fasterxml.jackson.databind.ObjectMapper; -import com.somemore.ControllerTestSupport; -import com.somemore.WithMockCustomUser; +import com.somemore.support.ControllerTestSupport; +import com.somemore.support.annotation.WithMockCustomUser; import com.somemore.volunteerapply.dto.request.VolunteerApplyCreateRequestDto; import com.somemore.volunteerapply.usecase.ApplyVolunteerApplyUseCase; import com.somemore.volunteerapply.usecase.WithdrawVolunteerApplyUseCase; diff --git a/src/test/java/com/somemore/volunteerapply/controller/VolunteerApplyQueryApiControllerTest.java b/src/test/java/com/somemore/volunteerapply/controller/VolunteerApplyQueryApiControllerTest.java index 4f9c3819c..7ea3776d5 100644 --- a/src/test/java/com/somemore/volunteerapply/controller/VolunteerApplyQueryApiControllerTest.java +++ b/src/test/java/com/somemore/volunteerapply/controller/VolunteerApplyQueryApiControllerTest.java @@ -8,14 +8,14 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -import com.somemore.ControllerTestSupport; -import com.somemore.WithMockCustomUser; +import com.somemore.support.ControllerTestSupport; +import com.somemore.support.annotation.WithMockCustomUser; import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; import com.somemore.volunteerapply.dto.response.VolunteerApplyRecruitInfoResponseDto; import com.somemore.volunteerapply.dto.response.VolunteerApplyResponseDto; import com.somemore.volunteerapply.dto.response.VolunteerApplySummaryResponseDto; import com.somemore.volunteerapply.dto.response.VolunteerApplyVolunteerInfoResponseDto; -import com.somemore.facade.volunteerapply.VolunteerApplyQueryFacadeUseCase; +import com.somemore.volunteerapply.usecase.VolunteerApplyQueryFacadeUseCase; import com.somemore.volunteerapply.usecase.VolunteerApplyQueryUseCase; import java.util.Collections; import java.util.UUID; diff --git a/src/test/java/com/somemore/volunteerapply/repository/VolunteerApplyRepositoryImplTest.java b/src/test/java/com/somemore/volunteerapply/repository/VolunteerApplyRepositoryImplTest.java index 2a405c24c..104cc6668 100644 --- a/src/test/java/com/somemore/volunteerapply/repository/VolunteerApplyRepositoryImplTest.java +++ b/src/test/java/com/somemore/volunteerapply/repository/VolunteerApplyRepositoryImplTest.java @@ -4,7 +4,7 @@ import static com.somemore.volunteerapply.domain.ApplyStatus.REJECTED; import static org.assertj.core.api.Assertions.assertThat; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.volunteerapply.domain.ApplyStatus; import com.somemore.volunteerapply.domain.VolunteerApply; import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; diff --git a/src/test/java/com/somemore/volunteerapply/service/ApplyVolunteerApplyStatusChangeServiceTest.java b/src/test/java/com/somemore/volunteerapply/service/ApplyVolunteerApplyStatusChangeServiceTest.java index 6a082e10a..153b29e34 100644 --- a/src/test/java/com/somemore/volunteerapply/service/ApplyVolunteerApplyStatusChangeServiceTest.java +++ b/src/test/java/com/somemore/volunteerapply/service/ApplyVolunteerApplyStatusChangeServiceTest.java @@ -1,13 +1,13 @@ package com.somemore.volunteerapply.service; -import static com.somemore.common.fixture.RecruitBoardFixture.createCloseRecruitBoard; -import static com.somemore.common.fixture.RecruitBoardFixture.createRecruitBoard; +import static com.somemore.support.fixture.RecruitBoardFixture.createCloseRecruitBoard; +import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; import static com.somemore.global.exception.ExceptionMessage.RECRUITMENT_NOT_OPEN; import static com.somemore.volunteerapply.domain.ApplyStatus.WAITING; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.global.exception.BadRequestException; import com.somemore.recruitboard.domain.RecruitBoard; import com.somemore.recruitboard.repository.RecruitBoardRepository; diff --git a/src/test/java/com/somemore/volunteerapply/service/ApproveVolunteerApplyStatusChangeServiceTest.java b/src/test/java/com/somemore/volunteerapply/service/ApproveVolunteerApplyStatusChangeServiceTest.java index 6c5b541ff..1768c2be4 100644 --- a/src/test/java/com/somemore/volunteerapply/service/ApproveVolunteerApplyStatusChangeServiceTest.java +++ b/src/test/java/com/somemore/volunteerapply/service/ApproveVolunteerApplyStatusChangeServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.volunteerapply.service; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.global.common.event.ServerEventPublisher; import com.somemore.global.exception.BadRequestException; import com.somemore.global.exception.ExceptionMessage; @@ -19,8 +19,8 @@ import java.util.UUID; -import static com.somemore.common.fixture.RecruitBoardFixture.createCompletedRecruitBoard; -import static com.somemore.common.fixture.RecruitBoardFixture.createRecruitBoard; +import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; +import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_RECRUIT_BOARD; import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; diff --git a/src/test/java/com/somemore/volunteerapply/service/RejectVolunteerApplyStatusChangeServiceTest.java b/src/test/java/com/somemore/volunteerapply/service/RejectVolunteerApplyStatusChangeServiceTest.java index c929a0acf..866c9e312 100644 --- a/src/test/java/com/somemore/volunteerapply/service/RejectVolunteerApplyStatusChangeServiceTest.java +++ b/src/test/java/com/somemore/volunteerapply/service/RejectVolunteerApplyStatusChangeServiceTest.java @@ -1,6 +1,6 @@ package com.somemore.volunteerapply.service; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.global.common.event.ServerEventPublisher; import com.somemore.global.exception.BadRequestException; import com.somemore.global.exception.ExceptionMessage; @@ -19,8 +19,8 @@ import java.util.UUID; -import static com.somemore.common.fixture.RecruitBoardFixture.createCompletedRecruitBoard; -import static com.somemore.common.fixture.RecruitBoardFixture.createRecruitBoard; +import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; +import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_RECRUIT_BOARD; import static com.somemore.recruitboard.domain.VolunteerCategory.OTHER; import static com.somemore.volunteerapply.domain.ApplyStatus.REJECTED; diff --git a/src/test/java/com/somemore/facade/volunteerapply/SettleVolunteerApplyFacadeServiceTest.java b/src/test/java/com/somemore/volunteerapply/service/SettleVolunteerApplyFacadeServiceTest.java similarity index 96% rename from src/test/java/com/somemore/facade/volunteerapply/SettleVolunteerApplyFacadeServiceTest.java rename to src/test/java/com/somemore/volunteerapply/service/SettleVolunteerApplyFacadeServiceTest.java index f53e4a5f3..8266e0157 100644 --- a/src/test/java/com/somemore/facade/volunteerapply/SettleVolunteerApplyFacadeServiceTest.java +++ b/src/test/java/com/somemore/volunteerapply/service/SettleVolunteerApplyFacadeServiceTest.java @@ -1,19 +1,19 @@ -package com.somemore.facade.volunteerapply; +package com.somemore.volunteerapply.service; -import static com.somemore.auth.oauth.OAuthProvider.NAVER; -import static com.somemore.common.fixture.RecruitBoardFixture.createCompletedRecruitBoard; +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; import static com.somemore.global.exception.ExceptionMessage.RECRUIT_BOARD_ID_MISMATCH; import static com.somemore.global.exception.ExceptionMessage.UNAUTHORIZED_RECRUIT_BOARD; import static com.somemore.global.exception.ExceptionMessage.VOLUNTEER_APPLY_LIST_MISMATCH; import static com.somemore.recruitboard.domain.VolunteerCategory.COUNSELING; +import static com.somemore.support.fixture.RecruitBoardFixture.createCompletedRecruitBoard; import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import com.somemore.IntegrationTestSupport; import com.somemore.global.exception.BadRequestException; import com.somemore.recruitboard.domain.RecruitBoard; import com.somemore.recruitboard.repository.RecruitBoardRepository; +import com.somemore.support.IntegrationTestSupport; import com.somemore.volunteer.domain.Volunteer; import com.somemore.volunteer.repository.VolunteerRepository; import com.somemore.volunteerapply.domain.VolunteerApply; diff --git a/src/test/java/com/somemore/facade/volunteerapply/VolunteerApplyQueryFacadeServiceTest.java b/src/test/java/com/somemore/volunteerapply/service/VolunteerApplyQueryFacadeServiceTest.java similarity index 95% rename from src/test/java/com/somemore/facade/volunteerapply/VolunteerApplyQueryFacadeServiceTest.java rename to src/test/java/com/somemore/volunteerapply/service/VolunteerApplyQueryFacadeServiceTest.java index 658ccb69b..d303630f1 100644 --- a/src/test/java/com/somemore/facade/volunteerapply/VolunteerApplyQueryFacadeServiceTest.java +++ b/src/test/java/com/somemore/volunteerapply/service/VolunteerApplyQueryFacadeServiceTest.java @@ -1,13 +1,13 @@ -package com.somemore.facade.volunteerapply; +package com.somemore.volunteerapply.service; -import static com.somemore.auth.oauth.OAuthProvider.NAVER; -import static com.somemore.common.fixture.RecruitBoardFixture.createRecruitBoard; +import static com.somemore.global.auth.oauth.OAuthProvider.NAVER; +import static com.somemore.support.fixture.RecruitBoardFixture.createRecruitBoard; import static com.somemore.volunteerapply.domain.ApplyStatus.APPROVED; import static org.assertj.core.api.Assertions.assertThat; -import com.somemore.IntegrationTestSupport; import com.somemore.recruitboard.domain.RecruitBoard; import com.somemore.recruitboard.repository.RecruitBoardRepository; +import com.somemore.support.IntegrationTestSupport; import com.somemore.volunteer.domain.Volunteer; import com.somemore.volunteer.domain.VolunteerDetail; import com.somemore.volunteer.dto.request.VolunteerRegisterRequestDto; diff --git a/src/test/java/com/somemore/volunteerapply/service/VolunteerApplyQueryServiceTest.java b/src/test/java/com/somemore/volunteerapply/service/VolunteerApplyQueryServiceTest.java index 980bef7d8..81416b4a6 100644 --- a/src/test/java/com/somemore/volunteerapply/service/VolunteerApplyQueryServiceTest.java +++ b/src/test/java/com/somemore/volunteerapply/service/VolunteerApplyQueryServiceTest.java @@ -5,7 +5,7 @@ import static com.somemore.volunteerapply.domain.ApplyStatus.WAITING; import static org.assertj.core.api.Assertions.assertThat; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.volunteerapply.domain.ApplyStatus; import com.somemore.volunteerapply.domain.VolunteerApply; import com.somemore.volunteerapply.dto.condition.VolunteerApplySearchCondition; diff --git a/src/test/java/com/somemore/volunteerapply/service/WithdrawVolunteerApplyServiceTest.java b/src/test/java/com/somemore/volunteerapply/service/WithdrawVolunteerApplyServiceTest.java index bef9ec4bd..92e3ab409 100644 --- a/src/test/java/com/somemore/volunteerapply/service/WithdrawVolunteerApplyServiceTest.java +++ b/src/test/java/com/somemore/volunteerapply/service/WithdrawVolunteerApplyServiceTest.java @@ -5,7 +5,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import com.somemore.IntegrationTestSupport; +import com.somemore.support.IntegrationTestSupport; import com.somemore.global.exception.BadRequestException; import com.somemore.volunteerapply.domain.ApplyStatus; import com.somemore.volunteerapply.domain.VolunteerApply;