From 682256f7fc251602a01b983ab7fb9846363520e1 Mon Sep 17 00:00:00 2001 From: DongGeon0908 Date: Mon, 8 Jul 2024 09:18:35 +0900 Subject: [PATCH] =?UTF-8?q?refac:=20=ED=8C=A8=ED=82=A4=EC=A7=80=20?= =?UTF-8?q?=EA=B5=AC=EC=A1=B0=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/com/hero/alignlab/Application.kt | 2 +- .../hero/alignlab/{ => common}/extension/DateExtension.kt | 2 +- .../alignlab/{ => common}/extension/EncoderExtension.kt | 2 +- .../hero/alignlab/{ => common}/extension/JsonExtension.kt | 2 +- .../alignlab/{ => common}/extension/LoggerExtension.kt | 2 +- .../alignlab/{ => common}/extension/QuerydslExtension.kt | 2 +- .../alignlab/{ => common}/extension/ResponseExtension.kt | 2 +- .../{ => common}/extension/ServerHttpExtension.kt | 2 +- .../extension/TransactionTemplateExtension.kt | 2 +- .../hero/alignlab/config/{ => encrypt}/EncryptConfig.kt | 2 +- .../com/hero/alignlab/config/{ => jwt}/JwtConfig.kt | 2 +- .../com/hero/alignlab/config/{ => web}/JacksonConfig.kt | 2 +- .../hero/alignlab/domain/auth/application/AuthFacade.kt | 2 +- .../alignlab/domain/auth/application/JwtTokenService.kt | 8 ++++---- .../hero/alignlab/domain/auth/resource/AuthResource.kt | 4 ++-- .../alignlab/domain/health/resource/HealthResource.kt | 2 +- .../hero/alignlab/domain/user/resource/DevUserResource.kt | 2 +- 17 files changed, 21 insertions(+), 21 deletions(-) rename src/main/kotlin/com/hero/alignlab/{ => common}/extension/DateExtension.kt (96%) rename src/main/kotlin/com/hero/alignlab/{ => common}/extension/EncoderExtension.kt (88%) rename src/main/kotlin/com/hero/alignlab/{ => common}/extension/JsonExtension.kt (97%) rename src/main/kotlin/com/hero/alignlab/{ => common}/extension/LoggerExtension.kt (90%) rename src/main/kotlin/com/hero/alignlab/{ => common}/extension/QuerydslExtension.kt (98%) rename src/main/kotlin/com/hero/alignlab/{ => common}/extension/ResponseExtension.kt (95%) rename src/main/kotlin/com/hero/alignlab/{ => common}/extension/ServerHttpExtension.kt (86%) rename src/main/kotlin/com/hero/alignlab/{ => common}/extension/TransactionTemplateExtension.kt (95%) rename src/main/kotlin/com/hero/alignlab/config/{ => encrypt}/EncryptConfig.kt (95%) rename src/main/kotlin/com/hero/alignlab/config/{ => jwt}/JwtConfig.kt (94%) rename src/main/kotlin/com/hero/alignlab/config/{ => web}/JacksonConfig.kt (95%) diff --git a/src/main/kotlin/com/hero/alignlab/Application.kt b/src/main/kotlin/com/hero/alignlab/Application.kt index 85ebcc7..35ef0e1 100644 --- a/src/main/kotlin/com/hero/alignlab/Application.kt +++ b/src/main/kotlin/com/hero/alignlab/Application.kt @@ -1,6 +1,6 @@ package com.hero.alignlab -import com.hero.alignlab.extension.Zone +import com.hero.alignlab.common.extension.Zone import io.github.oshai.kotlinlogging.KotlinLogging import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.context.event.ApplicationReadyEvent diff --git a/src/main/kotlin/com/hero/alignlab/extension/DateExtension.kt b/src/main/kotlin/com/hero/alignlab/common/extension/DateExtension.kt similarity index 96% rename from src/main/kotlin/com/hero/alignlab/extension/DateExtension.kt rename to src/main/kotlin/com/hero/alignlab/common/extension/DateExtension.kt index 54965c2..3fd9f62 100644 --- a/src/main/kotlin/com/hero/alignlab/extension/DateExtension.kt +++ b/src/main/kotlin/com/hero/alignlab/common/extension/DateExtension.kt @@ -1,4 +1,4 @@ -package com.hero.alignlab.extension +package com.hero.alignlab.common.extension import java.time.Instant import java.time.LocalDate diff --git a/src/main/kotlin/com/hero/alignlab/extension/EncoderExtension.kt b/src/main/kotlin/com/hero/alignlab/common/extension/EncoderExtension.kt similarity index 88% rename from src/main/kotlin/com/hero/alignlab/extension/EncoderExtension.kt rename to src/main/kotlin/com/hero/alignlab/common/extension/EncoderExtension.kt index 8f4f187..925b945 100644 --- a/src/main/kotlin/com/hero/alignlab/extension/EncoderExtension.kt +++ b/src/main/kotlin/com/hero/alignlab/common/extension/EncoderExtension.kt @@ -1,4 +1,4 @@ -package com.hero.alignlab.extension +package com.hero.alignlab.common.extension import java.net.URLDecoder import java.net.URLEncoder diff --git a/src/main/kotlin/com/hero/alignlab/extension/JsonExtension.kt b/src/main/kotlin/com/hero/alignlab/common/extension/JsonExtension.kt similarity index 97% rename from src/main/kotlin/com/hero/alignlab/extension/JsonExtension.kt rename to src/main/kotlin/com/hero/alignlab/common/extension/JsonExtension.kt index 4f53f03..f33c397 100644 --- a/src/main/kotlin/com/hero/alignlab/extension/JsonExtension.kt +++ b/src/main/kotlin/com/hero/alignlab/common/extension/JsonExtension.kt @@ -1,4 +1,4 @@ -package com.hero.alignlab.extension +package com.hero.alignlab.common.extension import com.fasterxml.jackson.annotation.JsonInclude import com.fasterxml.jackson.core.type.TypeReference diff --git a/src/main/kotlin/com/hero/alignlab/extension/LoggerExtension.kt b/src/main/kotlin/com/hero/alignlab/common/extension/LoggerExtension.kt similarity index 90% rename from src/main/kotlin/com/hero/alignlab/extension/LoggerExtension.kt rename to src/main/kotlin/com/hero/alignlab/common/extension/LoggerExtension.kt index d7d85a1..3613b94 100644 --- a/src/main/kotlin/com/hero/alignlab/extension/LoggerExtension.kt +++ b/src/main/kotlin/com/hero/alignlab/common/extension/LoggerExtension.kt @@ -1,4 +1,4 @@ -package com.hero.alignlab.extension +package com.hero.alignlab.common.extension import io.github.oshai.kotlinlogging.KLogger import kotlinx.coroutines.CancellationException diff --git a/src/main/kotlin/com/hero/alignlab/extension/QuerydslExtension.kt b/src/main/kotlin/com/hero/alignlab/common/extension/QuerydslExtension.kt similarity index 98% rename from src/main/kotlin/com/hero/alignlab/extension/QuerydslExtension.kt rename to src/main/kotlin/com/hero/alignlab/common/extension/QuerydslExtension.kt index 337b450..61fdbb7 100644 --- a/src/main/kotlin/com/hero/alignlab/extension/QuerydslExtension.kt +++ b/src/main/kotlin/com/hero/alignlab/common/extension/QuerydslExtension.kt @@ -1,4 +1,4 @@ -package com.hero.alignlab.extension +package com.hero.alignlab.common.extension import com.hero.alignlab.exception.AlignlabException import com.hero.alignlab.exception.ErrorCode diff --git a/src/main/kotlin/com/hero/alignlab/extension/ResponseExtension.kt b/src/main/kotlin/com/hero/alignlab/common/extension/ResponseExtension.kt similarity index 95% rename from src/main/kotlin/com/hero/alignlab/extension/ResponseExtension.kt rename to src/main/kotlin/com/hero/alignlab/common/extension/ResponseExtension.kt index 073b330..2c6425a 100644 --- a/src/main/kotlin/com/hero/alignlab/extension/ResponseExtension.kt +++ b/src/main/kotlin/com/hero/alignlab/common/extension/ResponseExtension.kt @@ -1,4 +1,4 @@ -package com.hero.alignlab.extension +package com.hero.alignlab.common.extension import com.hero.alignlab.common.model.PageResponse import com.hero.alignlab.common.model.Response diff --git a/src/main/kotlin/com/hero/alignlab/extension/ServerHttpExtension.kt b/src/main/kotlin/com/hero/alignlab/common/extension/ServerHttpExtension.kt similarity index 86% rename from src/main/kotlin/com/hero/alignlab/extension/ServerHttpExtension.kt rename to src/main/kotlin/com/hero/alignlab/common/extension/ServerHttpExtension.kt index f8a53e6..e07a3fb 100644 --- a/src/main/kotlin/com/hero/alignlab/extension/ServerHttpExtension.kt +++ b/src/main/kotlin/com/hero/alignlab/common/extension/ServerHttpExtension.kt @@ -1,4 +1,4 @@ -package com.hero.alignlab.extension +package com.hero.alignlab.common.extension import org.springframework.http.server.reactive.ServerHttpRequest diff --git a/src/main/kotlin/com/hero/alignlab/extension/TransactionTemplateExtension.kt b/src/main/kotlin/com/hero/alignlab/common/extension/TransactionTemplateExtension.kt similarity index 95% rename from src/main/kotlin/com/hero/alignlab/extension/TransactionTemplateExtension.kt rename to src/main/kotlin/com/hero/alignlab/common/extension/TransactionTemplateExtension.kt index e133210..78c94f3 100644 --- a/src/main/kotlin/com/hero/alignlab/extension/TransactionTemplateExtension.kt +++ b/src/main/kotlin/com/hero/alignlab/common/extension/TransactionTemplateExtension.kt @@ -1,4 +1,4 @@ -package com.hero.alignlab.extension +package com.hero.alignlab.common.extension import com.hero.alignlab.exception.ErrorCode import com.hero.alignlab.exception.FailToExecuteException diff --git a/src/main/kotlin/com/hero/alignlab/config/EncryptConfig.kt b/src/main/kotlin/com/hero/alignlab/config/encrypt/EncryptConfig.kt similarity index 95% rename from src/main/kotlin/com/hero/alignlab/config/EncryptConfig.kt rename to src/main/kotlin/com/hero/alignlab/config/encrypt/EncryptConfig.kt index ae22519..65e7ac3 100644 --- a/src/main/kotlin/com/hero/alignlab/config/EncryptConfig.kt +++ b/src/main/kotlin/com/hero/alignlab/config/encrypt/EncryptConfig.kt @@ -1,4 +1,4 @@ -package com.hero.alignlab.config +package com.hero.alignlab.config.encrypt import com.hero.alignlab.common.encrypt.Encryptor import io.github.oshai.kotlinlogging.KotlinLogging diff --git a/src/main/kotlin/com/hero/alignlab/config/JwtConfig.kt b/src/main/kotlin/com/hero/alignlab/config/jwt/JwtConfig.kt similarity index 94% rename from src/main/kotlin/com/hero/alignlab/config/JwtConfig.kt rename to src/main/kotlin/com/hero/alignlab/config/jwt/JwtConfig.kt index 46cf3a5..056da5d 100644 --- a/src/main/kotlin/com/hero/alignlab/config/JwtConfig.kt +++ b/src/main/kotlin/com/hero/alignlab/config/jwt/JwtConfig.kt @@ -1,4 +1,4 @@ -package com.hero.alignlab.config +package com.hero.alignlab.config.jwt import jakarta.validation.constraints.NotBlank import org.springframework.boot.context.properties.ConfigurationProperties diff --git a/src/main/kotlin/com/hero/alignlab/config/JacksonConfig.kt b/src/main/kotlin/com/hero/alignlab/config/web/JacksonConfig.kt similarity index 95% rename from src/main/kotlin/com/hero/alignlab/config/JacksonConfig.kt rename to src/main/kotlin/com/hero/alignlab/config/web/JacksonConfig.kt index 42c4846..fb6deed 100644 --- a/src/main/kotlin/com/hero/alignlab/config/JacksonConfig.kt +++ b/src/main/kotlin/com/hero/alignlab/config/web/JacksonConfig.kt @@ -1,4 +1,4 @@ -package com.hero.alignlab.config +package com.hero.alignlab.config.web import com.fasterxml.jackson.annotation.JsonInclude import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer diff --git a/src/main/kotlin/com/hero/alignlab/domain/auth/application/AuthFacade.kt b/src/main/kotlin/com/hero/alignlab/domain/auth/application/AuthFacade.kt index f451d5b..6c1a5de 100644 --- a/src/main/kotlin/com/hero/alignlab/domain/auth/application/AuthFacade.kt +++ b/src/main/kotlin/com/hero/alignlab/domain/auth/application/AuthFacade.kt @@ -19,7 +19,7 @@ import com.hero.alignlab.domain.user.model.response.UserInfoResponse import com.hero.alignlab.exception.ErrorCode import com.hero.alignlab.exception.InvalidRequestException import com.hero.alignlab.exception.InvalidTokenException -import com.hero.alignlab.extension.coExecute +import com.hero.alignlab.common.extension.coExecute import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import org.springframework.stereotype.Service diff --git a/src/main/kotlin/com/hero/alignlab/domain/auth/application/JwtTokenService.kt b/src/main/kotlin/com/hero/alignlab/domain/auth/application/JwtTokenService.kt index d4821da..18a7424 100644 --- a/src/main/kotlin/com/hero/alignlab/domain/auth/application/JwtTokenService.kt +++ b/src/main/kotlin/com/hero/alignlab/domain/auth/application/JwtTokenService.kt @@ -3,14 +3,14 @@ package com.hero.alignlab.domain.auth.application import com.auth0.jwt.JWT import com.auth0.jwt.algorithms.Algorithm import com.fasterxml.jackson.module.kotlin.readValue -import com.hero.alignlab.config.JwtConfig +import com.hero.alignlab.config.jwt.JwtConfig import com.hero.alignlab.domain.auth.model.AuthUserToken import com.hero.alignlab.domain.auth.model.AuthUserTokenPayload import com.hero.alignlab.exception.ErrorCode import com.hero.alignlab.exception.InvalidTokenException -import com.hero.alignlab.extension.decodeBase64 -import com.hero.alignlab.extension.mapper -import com.hero.alignlab.extension.toInstant +import com.hero.alignlab.common.extension.decodeBase64 +import com.hero.alignlab.common.extension.mapper +import com.hero.alignlab.common.extension.toInstant import io.github.oshai.kotlinlogging.KotlinLogging import org.springframework.stereotype.Service import reactor.core.publisher.Mono diff --git a/src/main/kotlin/com/hero/alignlab/domain/auth/resource/AuthResource.kt b/src/main/kotlin/com/hero/alignlab/domain/auth/resource/AuthResource.kt index 3840f4f..70639de 100644 --- a/src/main/kotlin/com/hero/alignlab/domain/auth/resource/AuthResource.kt +++ b/src/main/kotlin/com/hero/alignlab/domain/auth/resource/AuthResource.kt @@ -4,8 +4,8 @@ import com.hero.alignlab.domain.auth.application.AuthFacade import com.hero.alignlab.domain.auth.model.AuthUser import com.hero.alignlab.domain.auth.model.request.SignInRequest import com.hero.alignlab.domain.auth.model.request.SignUpRequest -import com.hero.alignlab.extension.wrapCreated -import com.hero.alignlab.extension.wrapOk +import com.hero.alignlab.common.extension.wrapCreated +import com.hero.alignlab.common.extension.wrapOk import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.tags.Tag import org.springframework.http.MediaType diff --git a/src/main/kotlin/com/hero/alignlab/domain/health/resource/HealthResource.kt b/src/main/kotlin/com/hero/alignlab/domain/health/resource/HealthResource.kt index 8fa7184..19982f5 100644 --- a/src/main/kotlin/com/hero/alignlab/domain/health/resource/HealthResource.kt +++ b/src/main/kotlin/com/hero/alignlab/domain/health/resource/HealthResource.kt @@ -1,7 +1,7 @@ package com.hero.alignlab.domain.health.resource import com.hero.alignlab.domain.health.model.response.HealthResponse -import com.hero.alignlab.extension.wrapOk +import com.hero.alignlab.common.extension.wrapOk import io.swagger.v3.oas.annotations.tags.Tag import org.springframework.core.env.Environment import org.springframework.http.MediaType diff --git a/src/main/kotlin/com/hero/alignlab/domain/user/resource/DevUserResource.kt b/src/main/kotlin/com/hero/alignlab/domain/user/resource/DevUserResource.kt index 87fe3fc..f05baff 100644 --- a/src/main/kotlin/com/hero/alignlab/domain/user/resource/DevUserResource.kt +++ b/src/main/kotlin/com/hero/alignlab/domain/user/resource/DevUserResource.kt @@ -2,7 +2,7 @@ package com.hero.alignlab.domain.user.resource import com.hero.alignlab.config.swagger.SwaggerTag.DEV_TAG import com.hero.alignlab.domain.user.application.UserService -import com.hero.alignlab.extension.wrapOk +import com.hero.alignlab.common.extension.wrapOk import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.tags.Tag import org.springframework.http.MediaType