From a17d1b8b887ec900378ec2464bf58317cff545eb Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Tue, 6 Oct 2026 19:48:10 +0900 Subject: [PATCH 01/22] =?UTF-8?q?chore:=20Swagger=20UI=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20*=20=ED=98=84=EC=9E=AC=20=EB=8F=84=EB=A9=94?= =?UTF-8?q?=EC=9D=B8=20=EA=B8=B0=EC=A4=80=20=EC=84=9C=EB=B9=84=EC=8A=A4?= =?UTF-8?q?=EB=B3=84=20API=20=EB=AC=B8=EC=84=9C=20=EA=B2=BD=EB=A1=9C=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20*=20Member=20Service=EB=A5=BC=20=EA=B8=B0?= =?UTF-8?q?=EB=B3=B8=20API=20=EB=AC=B8=EC=84=9C=EB=A1=9C=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../swagger-dev/swagger-config.json | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 common/infrastructure/swagger-dev/swagger-config.json diff --git a/common/infrastructure/swagger-dev/swagger-config.json b/common/infrastructure/swagger-dev/swagger-config.json new file mode 100644 index 0000000..2bbb9a0 --- /dev/null +++ b/common/infrastructure/swagger-dev/swagger-config.json @@ -0,0 +1,23 @@ +{ + "_comment": "서비스가 추가되거나 변경될 경우 항목 추가 및 수정 필요", + "urls": [ + { + "name": "Member Service", + "url": "/api-docs/member" + }, + { + "name": "Collage Service", + "url": "/api-docs/collage" + }, + { + "name": "Mypage Service", + "url": "/api-docs/mypage" + } + ], + "urls.primaryName": "Member Service", + "deepLinking": true, + "displayRequestDuration": true, + "operationsSorter": "method", + "tagsSorter": "alpha", + "persistAuthorization": true +} From cf94d6cd915a350a49f2717de251f6127c5c1d08 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Tue, 6 Oct 2026 19:57:03 +0900 Subject: [PATCH 02/22] =?UTF-8?q?chore:=20Swagger=20UI=20=EC=A0=84?= =?UTF-8?q?=EC=9A=A9=20Docker=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EA=B5=AC?= =?UTF-8?q?=EC=84=B1=20*=20Swagger=20UI=20=EC=A0=84=EC=9A=A9=20Dockerfile?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80=20*=20swagger-config.json=20=EB=A1=9C?= =?UTF-8?q?=EB=93=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/infrastructure/swagger-dev/DockerFile | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 common/infrastructure/swagger-dev/DockerFile diff --git a/common/infrastructure/swagger-dev/DockerFile b/common/infrastructure/swagger-dev/DockerFile new file mode 100644 index 0000000..9f6b6e0 --- /dev/null +++ b/common/infrastructure/swagger-dev/DockerFile @@ -0,0 +1,4 @@ +# swagger 전용 도커 이미지 +FROM swaggerapi/swagger-ui:v5.31.0 +COPY swagger-config.json /usr/share/nginx/html/swagger-config.json +ENV CONFIG_URL=/swagger-config.json From 2371b50ab46f5f817f0d2c9767e348c01cb21edf Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Mon, 12 Oct 2026 14:23:18 +0900 Subject: [PATCH 03/22] =?UTF-8?q?refactor:=20common=20=EB=94=94=EB=A0=89?= =?UTF-8?q?=ED=84=B0=EB=A6=AC=EB=A5=BC=20framey-common=EC=9C=BC=EB=A1=9C?= =?UTF-8?q?=20=EB=84=A4=EC=9E=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 6 +++--- .../checkstyle/naver-checkstyle-rules.xml | 0 .../checkstyle/naver-checkstyle-suppressions.xml | 0 .../checkstyle/naver-eclipse-formatter.xml | 0 .../checkstyle/naver-intellij-formatter.xml | 0 {common => framey-common}/checkstyle/naver.importorder | 0 {common => framey-common}/common-jpa/build.gradle | 0 .../src/main/java/framey/db/entity/BaseEntity.java | 0 {common => framey-common}/common-monitoring/build.gradle | 0 .../src/main/java/framey/common/annotation/LogActivity.java | 0 .../main/java/framey/common/aspect/LogActivityAspect.java | 0 .../framey/common/config/MonitoringAutoConfiguration.java | 0 .../src/main/java/framey/common/filter/TraceIdFilter.java | 0 ...ngframework.boot.autoconfigure.AutoConfiguration.imports | 0 .../common-monitoring/src/main/resources/logback-spring.xml | 0 {common => framey-common}/common-web/build.gradle | 0 .../java/framey/common/advice/CommonExceptionHandler.java | 0 .../framey/common/config/CommonWebAutoConfiguration.java | 0 .../src/main/java/framey/common/config/SwaggerConfig.java | 0 .../java/framey/common/exception/BusinessException.java | 0 .../main/java/framey/common/exception/CommonErrorCode.java | 0 .../common/exception/ServiceUnavailableException.java | 0 .../src/main/java/framey/common/response/ApiResponse.java | 0 .../src/main/java/framey/common/response/ErrorCode.java | 0 .../src/main/java/framey/common/response/SuccessCode.java | 0 .../framey/common/swagger/ErrorCodeExampleCustomizer.java | 0 .../src/main/java/framey/common/swagger/ExampleHolder.java | 0 .../common/swagger/annotation/ApiErrorCodeExample.java | 0 .../java/framey/common/swagger/annotation/PublicApi.java | 0 ...ngframework.boot.autoconfigure.AutoConfiguration.imports | 0 .../docker/local/docker-compose.local.yaml | 0 .../infrastructure/swagger-dev/DockerFile | 0 .../infrastructure/swagger-dev/swagger-config.json | 0 settings.gradle | 6 +++--- 34 files changed, 6 insertions(+), 6 deletions(-) rename {common => framey-common}/checkstyle/naver-checkstyle-rules.xml (100%) rename {common => framey-common}/checkstyle/naver-checkstyle-suppressions.xml (100%) rename {common => framey-common}/checkstyle/naver-eclipse-formatter.xml (100%) rename {common => framey-common}/checkstyle/naver-intellij-formatter.xml (100%) rename {common => framey-common}/checkstyle/naver.importorder (100%) rename {common => framey-common}/common-jpa/build.gradle (100%) rename {common => framey-common}/common-jpa/src/main/java/framey/db/entity/BaseEntity.java (100%) rename {common => framey-common}/common-monitoring/build.gradle (100%) rename {common => framey-common}/common-monitoring/src/main/java/framey/common/annotation/LogActivity.java (100%) rename {common => framey-common}/common-monitoring/src/main/java/framey/common/aspect/LogActivityAspect.java (100%) rename {common => framey-common}/common-monitoring/src/main/java/framey/common/config/MonitoringAutoConfiguration.java (100%) rename {common => framey-common}/common-monitoring/src/main/java/framey/common/filter/TraceIdFilter.java (100%) rename {common => framey-common}/common-monitoring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports (100%) rename {common => framey-common}/common-monitoring/src/main/resources/logback-spring.xml (100%) rename {common => framey-common}/common-web/build.gradle (100%) rename {common => framey-common}/common-web/src/main/java/framey/common/advice/CommonExceptionHandler.java (100%) rename {common => framey-common}/common-web/src/main/java/framey/common/config/CommonWebAutoConfiguration.java (100%) rename {common => framey-common}/common-web/src/main/java/framey/common/config/SwaggerConfig.java (100%) rename {common => framey-common}/common-web/src/main/java/framey/common/exception/BusinessException.java (100%) rename {common => framey-common}/common-web/src/main/java/framey/common/exception/CommonErrorCode.java (100%) rename {common => framey-common}/common-web/src/main/java/framey/common/exception/ServiceUnavailableException.java (100%) rename {common => framey-common}/common-web/src/main/java/framey/common/response/ApiResponse.java (100%) rename {common => framey-common}/common-web/src/main/java/framey/common/response/ErrorCode.java (100%) rename {common => framey-common}/common-web/src/main/java/framey/common/response/SuccessCode.java (100%) rename {common => framey-common}/common-web/src/main/java/framey/common/swagger/ErrorCodeExampleCustomizer.java (100%) rename {common => framey-common}/common-web/src/main/java/framey/common/swagger/ExampleHolder.java (100%) rename {common => framey-common}/common-web/src/main/java/framey/common/swagger/annotation/ApiErrorCodeExample.java (100%) rename {common => framey-common}/common-web/src/main/java/framey/common/swagger/annotation/PublicApi.java (100%) rename {common => framey-common}/common-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports (100%) rename {common => framey-common}/docker/local/docker-compose.local.yaml (100%) rename {common => framey-common}/infrastructure/swagger-dev/DockerFile (100%) rename {common => framey-common}/infrastructure/swagger-dev/swagger-config.json (100%) diff --git a/build.gradle b/build.gradle index 0ad417c..e5f006b 100644 --- a/build.gradle +++ b/build.gradle @@ -46,7 +46,7 @@ subprojects { toolVersion = '10.26.1' configFile = rootProject.file( - 'common/checkstyle/naver-checkstyle-rules.xml' + 'framey-common/checkstyle/naver-checkstyle-rules.xml' ) maxWarnings = 0 @@ -55,7 +55,7 @@ subprojects { configProperties = [ 'suppressionFile': rootProject - .file('common/checkstyle/naver-checkstyle-suppressions.xml') + .file('framey-common/checkstyle/naver-checkstyle-suppressions.xml') .absolutePath ] } @@ -70,4 +70,4 @@ subprojects { tasks.withType(Test).configureEach { useJUnitPlatform() } -} \ No newline at end of file +} diff --git a/common/checkstyle/naver-checkstyle-rules.xml b/framey-common/checkstyle/naver-checkstyle-rules.xml similarity index 100% rename from common/checkstyle/naver-checkstyle-rules.xml rename to framey-common/checkstyle/naver-checkstyle-rules.xml diff --git a/common/checkstyle/naver-checkstyle-suppressions.xml b/framey-common/checkstyle/naver-checkstyle-suppressions.xml similarity index 100% rename from common/checkstyle/naver-checkstyle-suppressions.xml rename to framey-common/checkstyle/naver-checkstyle-suppressions.xml diff --git a/common/checkstyle/naver-eclipse-formatter.xml b/framey-common/checkstyle/naver-eclipse-formatter.xml similarity index 100% rename from common/checkstyle/naver-eclipse-formatter.xml rename to framey-common/checkstyle/naver-eclipse-formatter.xml diff --git a/common/checkstyle/naver-intellij-formatter.xml b/framey-common/checkstyle/naver-intellij-formatter.xml similarity index 100% rename from common/checkstyle/naver-intellij-formatter.xml rename to framey-common/checkstyle/naver-intellij-formatter.xml diff --git a/common/checkstyle/naver.importorder b/framey-common/checkstyle/naver.importorder similarity index 100% rename from common/checkstyle/naver.importorder rename to framey-common/checkstyle/naver.importorder diff --git a/common/common-jpa/build.gradle b/framey-common/common-jpa/build.gradle similarity index 100% rename from common/common-jpa/build.gradle rename to framey-common/common-jpa/build.gradle diff --git a/common/common-jpa/src/main/java/framey/db/entity/BaseEntity.java b/framey-common/common-jpa/src/main/java/framey/db/entity/BaseEntity.java similarity index 100% rename from common/common-jpa/src/main/java/framey/db/entity/BaseEntity.java rename to framey-common/common-jpa/src/main/java/framey/db/entity/BaseEntity.java diff --git a/common/common-monitoring/build.gradle b/framey-common/common-monitoring/build.gradle similarity index 100% rename from common/common-monitoring/build.gradle rename to framey-common/common-monitoring/build.gradle diff --git a/common/common-monitoring/src/main/java/framey/common/annotation/LogActivity.java b/framey-common/common-monitoring/src/main/java/framey/common/annotation/LogActivity.java similarity index 100% rename from common/common-monitoring/src/main/java/framey/common/annotation/LogActivity.java rename to framey-common/common-monitoring/src/main/java/framey/common/annotation/LogActivity.java diff --git a/common/common-monitoring/src/main/java/framey/common/aspect/LogActivityAspect.java b/framey-common/common-monitoring/src/main/java/framey/common/aspect/LogActivityAspect.java similarity index 100% rename from common/common-monitoring/src/main/java/framey/common/aspect/LogActivityAspect.java rename to framey-common/common-monitoring/src/main/java/framey/common/aspect/LogActivityAspect.java diff --git a/common/common-monitoring/src/main/java/framey/common/config/MonitoringAutoConfiguration.java b/framey-common/common-monitoring/src/main/java/framey/common/config/MonitoringAutoConfiguration.java similarity index 100% rename from common/common-monitoring/src/main/java/framey/common/config/MonitoringAutoConfiguration.java rename to framey-common/common-monitoring/src/main/java/framey/common/config/MonitoringAutoConfiguration.java diff --git a/common/common-monitoring/src/main/java/framey/common/filter/TraceIdFilter.java b/framey-common/common-monitoring/src/main/java/framey/common/filter/TraceIdFilter.java similarity index 100% rename from common/common-monitoring/src/main/java/framey/common/filter/TraceIdFilter.java rename to framey-common/common-monitoring/src/main/java/framey/common/filter/TraceIdFilter.java diff --git a/common/common-monitoring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/framey-common/common-monitoring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports similarity index 100% rename from common/common-monitoring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports rename to framey-common/common-monitoring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports diff --git a/common/common-monitoring/src/main/resources/logback-spring.xml b/framey-common/common-monitoring/src/main/resources/logback-spring.xml similarity index 100% rename from common/common-monitoring/src/main/resources/logback-spring.xml rename to framey-common/common-monitoring/src/main/resources/logback-spring.xml diff --git a/common/common-web/build.gradle b/framey-common/common-web/build.gradle similarity index 100% rename from common/common-web/build.gradle rename to framey-common/common-web/build.gradle diff --git a/common/common-web/src/main/java/framey/common/advice/CommonExceptionHandler.java b/framey-common/common-web/src/main/java/framey/common/advice/CommonExceptionHandler.java similarity index 100% rename from common/common-web/src/main/java/framey/common/advice/CommonExceptionHandler.java rename to framey-common/common-web/src/main/java/framey/common/advice/CommonExceptionHandler.java diff --git a/common/common-web/src/main/java/framey/common/config/CommonWebAutoConfiguration.java b/framey-common/common-web/src/main/java/framey/common/config/CommonWebAutoConfiguration.java similarity index 100% rename from common/common-web/src/main/java/framey/common/config/CommonWebAutoConfiguration.java rename to framey-common/common-web/src/main/java/framey/common/config/CommonWebAutoConfiguration.java diff --git a/common/common-web/src/main/java/framey/common/config/SwaggerConfig.java b/framey-common/common-web/src/main/java/framey/common/config/SwaggerConfig.java similarity index 100% rename from common/common-web/src/main/java/framey/common/config/SwaggerConfig.java rename to framey-common/common-web/src/main/java/framey/common/config/SwaggerConfig.java diff --git a/common/common-web/src/main/java/framey/common/exception/BusinessException.java b/framey-common/common-web/src/main/java/framey/common/exception/BusinessException.java similarity index 100% rename from common/common-web/src/main/java/framey/common/exception/BusinessException.java rename to framey-common/common-web/src/main/java/framey/common/exception/BusinessException.java diff --git a/common/common-web/src/main/java/framey/common/exception/CommonErrorCode.java b/framey-common/common-web/src/main/java/framey/common/exception/CommonErrorCode.java similarity index 100% rename from common/common-web/src/main/java/framey/common/exception/CommonErrorCode.java rename to framey-common/common-web/src/main/java/framey/common/exception/CommonErrorCode.java diff --git a/common/common-web/src/main/java/framey/common/exception/ServiceUnavailableException.java b/framey-common/common-web/src/main/java/framey/common/exception/ServiceUnavailableException.java similarity index 100% rename from common/common-web/src/main/java/framey/common/exception/ServiceUnavailableException.java rename to framey-common/common-web/src/main/java/framey/common/exception/ServiceUnavailableException.java diff --git a/common/common-web/src/main/java/framey/common/response/ApiResponse.java b/framey-common/common-web/src/main/java/framey/common/response/ApiResponse.java similarity index 100% rename from common/common-web/src/main/java/framey/common/response/ApiResponse.java rename to framey-common/common-web/src/main/java/framey/common/response/ApiResponse.java diff --git a/common/common-web/src/main/java/framey/common/response/ErrorCode.java b/framey-common/common-web/src/main/java/framey/common/response/ErrorCode.java similarity index 100% rename from common/common-web/src/main/java/framey/common/response/ErrorCode.java rename to framey-common/common-web/src/main/java/framey/common/response/ErrorCode.java diff --git a/common/common-web/src/main/java/framey/common/response/SuccessCode.java b/framey-common/common-web/src/main/java/framey/common/response/SuccessCode.java similarity index 100% rename from common/common-web/src/main/java/framey/common/response/SuccessCode.java rename to framey-common/common-web/src/main/java/framey/common/response/SuccessCode.java diff --git a/common/common-web/src/main/java/framey/common/swagger/ErrorCodeExampleCustomizer.java b/framey-common/common-web/src/main/java/framey/common/swagger/ErrorCodeExampleCustomizer.java similarity index 100% rename from common/common-web/src/main/java/framey/common/swagger/ErrorCodeExampleCustomizer.java rename to framey-common/common-web/src/main/java/framey/common/swagger/ErrorCodeExampleCustomizer.java diff --git a/common/common-web/src/main/java/framey/common/swagger/ExampleHolder.java b/framey-common/common-web/src/main/java/framey/common/swagger/ExampleHolder.java similarity index 100% rename from common/common-web/src/main/java/framey/common/swagger/ExampleHolder.java rename to framey-common/common-web/src/main/java/framey/common/swagger/ExampleHolder.java diff --git a/common/common-web/src/main/java/framey/common/swagger/annotation/ApiErrorCodeExample.java b/framey-common/common-web/src/main/java/framey/common/swagger/annotation/ApiErrorCodeExample.java similarity index 100% rename from common/common-web/src/main/java/framey/common/swagger/annotation/ApiErrorCodeExample.java rename to framey-common/common-web/src/main/java/framey/common/swagger/annotation/ApiErrorCodeExample.java diff --git a/common/common-web/src/main/java/framey/common/swagger/annotation/PublicApi.java b/framey-common/common-web/src/main/java/framey/common/swagger/annotation/PublicApi.java similarity index 100% rename from common/common-web/src/main/java/framey/common/swagger/annotation/PublicApi.java rename to framey-common/common-web/src/main/java/framey/common/swagger/annotation/PublicApi.java diff --git a/common/common-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/framey-common/common-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports similarity index 100% rename from common/common-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports rename to framey-common/common-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports diff --git a/common/docker/local/docker-compose.local.yaml b/framey-common/docker/local/docker-compose.local.yaml similarity index 100% rename from common/docker/local/docker-compose.local.yaml rename to framey-common/docker/local/docker-compose.local.yaml diff --git a/common/infrastructure/swagger-dev/DockerFile b/framey-common/infrastructure/swagger-dev/DockerFile similarity index 100% rename from common/infrastructure/swagger-dev/DockerFile rename to framey-common/infrastructure/swagger-dev/DockerFile diff --git a/common/infrastructure/swagger-dev/swagger-config.json b/framey-common/infrastructure/swagger-dev/swagger-config.json similarity index 100% rename from common/infrastructure/swagger-dev/swagger-config.json rename to framey-common/infrastructure/swagger-dev/swagger-config.json diff --git a/settings.gradle b/settings.gradle index 970e481..8cf2705 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,5 +1,5 @@ rootProject.name = 'server' -include ':common:common-monitoring' -include ':common:common-jpa' -include ':common:common-web' +include ':framey-common:common-monitoring' +include ':framey-common:common-jpa' +include ':framey-common:common-web' From 9341a1fac574d49a81f56c509998870ffb3a5027 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Mon, 12 Oct 2026 14:57:42 +0900 Subject: [PATCH 04/22] =?UTF-8?q?refacotr:=20=ED=94=84=EB=A1=9C=EC=A0=9D?= =?UTF-8?q?=ED=8A=B8=20=EB=AA=A8=EB=93=88=20=EA=B5=AC=EC=A1=B0=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0=20*=20framey-common=20=ED=95=98=EC=9C=84=20=EB=A9=80?= =?UTF-8?q?=ED=8B=B0=EB=AA=A8=EB=93=88(common-web,=20common-jpa,=20common-?= =?UTF-8?q?monitoring)=EC=9D=84=20=EC=97=AD=ED=95=A0=20=EA=B8=B0=EB=B0=98?= =?UTF-8?q?=EC=9D=98=20=EC=B5=9C=EC=83=81=EC=9C=84=20=EB=AA=A8=EB=93=88=20?= =?UTF-8?q?=EA=B5=AC=EC=A1=B0=EB=A1=9C=20=EC=9E=AC=EA=B5=AC=EC=84=B1=20*?= =?UTF-8?q?=20framey-web=EC=9D=84=20=EB=B6=84=EB=A6=AC=ED=95=98=EC=97=AC?= =?UTF-8?q?=20Swagger=20=EB=93=B1=20=EC=9B=B9=20=EA=B3=84=EC=B8=B5=20?= =?UTF-8?q?=EA=B3=B5=ED=86=B5=20=EC=84=A4=EC=A0=95=20=EB=B0=B0=EC=B9=98=20?= =?UTF-8?q?*=20framey-monitoring=EC=9D=84=20=EB=B6=84=EB=A6=AC=ED=95=98?= =?UTF-8?q?=EC=97=AC=20=EB=AA=A8=EB=8B=88=ED=84=B0=EB=A7=81=20=EB=B0=8F=20?= =?UTF-8?q?=EB=A1=9C=EA=B9=85=20=EA=B4=80=EB=A0=A8=20=EA=B5=AC=EC=84=B1?= =?UTF-8?q?=EC=9D=98=20=EC=B1=85=EC=9E=84=20=EB=B6=84=EB=A6=AC=20*=20frame?= =?UTF-8?q?y-infrastructure=EB=A5=BC=20=EC=83=9D=EC=84=B1=ED=95=98?= =?UTF-8?q?=EC=97=AC=20=EB=B0=B0=ED=8F=AC=20=EB=B0=8F=20=EC=9D=B8=ED=94=84?= =?UTF-8?q?=EB=9D=BC=20=EA=B4=80=EB=A0=A8=20=EC=84=A4=EC=A0=95=EC=9D=84=20?= =?UTF-8?q?=EC=95=A0=ED=94=8C=EB=A6=AC=EC=BC=80=EC=9D=B4=EC=85=98=20?= =?UTF-8?q?=EB=AA=A8=EB=93=88=EA=B3=BC=20=EB=B6=84=EB=A6=AC=20*=20?= =?UTF-8?q?=EA=B8=B0=EC=A1=B4=20=EB=AC=B8=EC=84=9C=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EA=B4=80=EB=A0=A8=20=EB=B6=80=EB=B6=84?= =?UTF-8?q?=EC=9D=84=20=EB=B3=80=EA=B2=BD=EB=90=9C=20=EA=B2=BD=EB=A1=9C?= =?UTF-8?q?=EB=A1=9C=20=EC=88=98=EC=A0=95=20*=20=EA=B5=AC=EC=A1=B0=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0=ED=95=A8=EC=9C=BC=EB=A1=9C=EC=8D=A8=20?= =?UTF-8?q?=EC=B1=85=EC=9E=84=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...4\200\353\240\250\353\254\270\354\204\234.md" | 8 ++++---- ...4\200\353\240\250\353\254\270\354\204\234.md" | 16 ++++++++-------- framey-common/{common-jpa => }/build.gradle | 1 + ....boot.autoconfigure.AutoConfiguration.imports | 1 - ....boot.autoconfigure.AutoConfiguration.imports | 1 - .../common/exception/BusinessException.java | 0 .../framey/common/exception/CommonErrorCode.java | 0 .../exception/ServiceUnavailableException.java | 0 .../main/java/framey/common/jpa}/BaseEntity.java | 2 +- .../java/framey/common/response/ApiResponse.java | 0 .../java/framey/common/response/ErrorCode.java | 0 .../java/framey/common/response/SuccessCode.java | 0 .../docker/local/docker-compose.local.yaml | 0 .../swagger-dev/DockerFile | 0 .../swagger-dev/swagger-config.json | 0 .../build.gradle | 0 .../monitoring}/annotation/LogActivity.java | 2 +- .../monitoring}/aspect/LogActivityAspect.java | 6 +++--- .../config/MonitoringAutoConfiguration.java | 6 +++--- .../framey/monitoring}/filter/TraceIdFilter.java | 4 ++-- ....boot.autoconfigure.AutoConfiguration.imports | 1 + .../src/main/resources/logback-spring.xml | 2 +- .../common-web => framey-web}/build.gradle | 2 ++ .../web}/advice/CommonExceptionHandler.java | 2 +- .../web}/config/CommonWebAutoConfiguration.java | 4 ++-- .../java/framey/web}/config/SwaggerConfig.java | 4 ++-- .../web}/swagger/ErrorCodeExampleCustomizer.java | 13 ++++++------- .../java/framey/web}/swagger/ExampleHolder.java | 2 +- .../swagger/annotation/ApiErrorCodeExample.java | 2 +- .../web}/swagger/annotation/PublicApi.java | 2 +- ....boot.autoconfigure.AutoConfiguration.imports | 1 + settings.gradle | 6 +++--- 32 files changed, 45 insertions(+), 43 deletions(-) rename framey-common/{common-jpa => }/build.gradle (62%) delete mode 100644 framey-common/common-monitoring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports delete mode 100644 framey-common/common-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports rename framey-common/{common-web => }/src/main/java/framey/common/exception/BusinessException.java (100%) rename framey-common/{common-web => }/src/main/java/framey/common/exception/CommonErrorCode.java (100%) rename framey-common/{common-web => }/src/main/java/framey/common/exception/ServiceUnavailableException.java (100%) rename framey-common/{common-jpa/src/main/java/framey/db/entity => src/main/java/framey/common/jpa}/BaseEntity.java (96%) rename framey-common/{common-web => }/src/main/java/framey/common/response/ApiResponse.java (100%) rename framey-common/{common-web => }/src/main/java/framey/common/response/ErrorCode.java (100%) rename framey-common/{common-web => }/src/main/java/framey/common/response/SuccessCode.java (100%) rename {framey-common => framey-infrastructure}/docker/local/docker-compose.local.yaml (100%) rename {framey-common/infrastructure => framey-infrastructure}/swagger-dev/DockerFile (100%) rename {framey-common/infrastructure => framey-infrastructure}/swagger-dev/swagger-config.json (100%) rename {framey-common/common-monitoring => framey-monitoring}/build.gradle (100%) rename {framey-common/common-monitoring/src/main/java/framey/common => framey-monitoring/src/main/java/framey/monitoring}/annotation/LogActivity.java (88%) rename {framey-common/common-monitoring/src/main/java/framey/common => framey-monitoring/src/main/java/framey/monitoring}/aspect/LogActivityAspect.java (90%) rename {framey-common/common-monitoring/src/main/java/framey/common => framey-monitoring/src/main/java/framey/monitoring}/config/MonitoringAutoConfiguration.java (74%) rename {framey-common/common-monitoring/src/main/java/framey/common => framey-monitoring/src/main/java/framey/monitoring}/filter/TraceIdFilter.java (96%) create mode 100644 framey-monitoring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports rename {framey-common/common-monitoring => framey-monitoring}/src/main/resources/logback-spring.xml (98%) rename {framey-common/common-web => framey-web}/build.gradle (87%) rename {framey-common/common-web/src/main/java/framey/common => framey-web/src/main/java/framey/web}/advice/CommonExceptionHandler.java (99%) rename {framey-common/common-web/src/main/java/framey/common => framey-web/src/main/java/framey/web}/config/CommonWebAutoConfiguration.java (73%) rename {framey-common/common-web/src/main/java/framey/common => framey-web/src/main/java/framey/web}/config/SwaggerConfig.java (95%) rename {framey-common/common-web/src/main/java/framey/common => framey-web/src/main/java/framey/web}/swagger/ErrorCodeExampleCustomizer.java (93%) rename {framey-common/common-web/src/main/java/framey/common => framey-web/src/main/java/framey/web}/swagger/ExampleHolder.java (87%) rename {framey-common/common-web/src/main/java/framey/common => framey-web/src/main/java/framey/web}/swagger/annotation/ApiErrorCodeExample.java (90%) rename {framey-common/common-web/src/main/java/framey/common => framey-web/src/main/java/framey/web}/swagger/annotation/PublicApi.java (87%) create mode 100644 framey-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports diff --git "a/docs/common/Swagger\354\240\201\354\232\251\352\264\200\353\240\250\353\254\270\354\204\234.md" "b/docs/common/Swagger\354\240\201\354\232\251\352\264\200\353\240\250\353\254\270\354\204\234.md" index 5ef75e7..61b139b 100644 --- "a/docs/common/Swagger\354\240\201\354\232\251\352\264\200\353\240\250\353\254\270\354\204\234.md" +++ "b/docs/common/Swagger\354\240\201\354\232\251\352\264\200\353\240\250\353\254\270\354\204\234.md" @@ -2,15 +2,15 @@ ### 서비스 모듈 의존성 추가 -Swagger를 사용할 각 서비스 모듈의 `build.gradle`에 `common-web` 의존성을 추가합니다. +Swagger를 사용할 각 서비스 모듈의 `build.gradle`에 `framey-web` 의존성을 추가합니다. ```gradle dependencies { - implementation project(':common:common-web') + implementation project(':framey-web') } ``` -`common-web`에는 다음 의존성이 포함되어 있습니다. +`framey-web`에는 다음 의존성이 포함되어 있습니다. ```gradle api 'org.springframework.boot:spring-boot-starter-web' @@ -91,7 +91,7 @@ http://localhost:{서비스 포트}/swagger http://localhost:{서비스 포트}/v3/api-docs ``` -`common-web`과 같이 독립적으로 실행되지 않는 공통 라이브러리 모듈에는 별도의 Swagger 주소가 생성되지 않습니다. +`framey-web`과 같이 독립적으로 실행되지 않는 공통 라이브러리 모듈에는 별도의 Swagger 주소가 생성되지 않습니다. #### 개발 환경 diff --git "a/docs/common/\353\241\234\352\271\205\354\213\234\354\212\244\355\205\234\352\265\254\354\266\225\352\264\200\353\240\250\353\254\270\354\204\234.md" "b/docs/common/\353\241\234\352\271\205\354\213\234\354\212\244\355\205\234\352\265\254\354\266\225\352\264\200\353\240\250\353\254\270\354\204\234.md" index f790ba3..7361bcd 100644 --- "a/docs/common/\353\241\234\352\271\205\354\213\234\354\212\244\355\205\234\352\265\254\354\266\225\352\264\200\353\240\250\353\254\270\354\204\234.md" +++ "b/docs/common/\353\241\234\352\271\205\354\213\234\354\212\244\355\205\234\352\265\254\354\266\225\352\264\200\353\240\250\353\254\270\354\204\234.md" @@ -5,7 +5,7 @@ ### 기능 -`common-monitoring` 기능 +`framey-monitoring` 기능 - **TraceId 생성** - HTTP 요청마다 고유 랜덤 TraceId를 생성. @@ -29,16 +29,16 @@ ```gradle rootProject.name = 'server' -include ':common:common-monitoring' +include ':framey-monitoring' //ex) include 'identity-service' : identity-service 모듈 추가 ``` #### 2. `build.gradle`에 의존성을 추가합니다 -새로운 서비스 모듈의 `build.gradle`에 `common-monitoring`을 의존성으로 추가해야 +새로운 서비스 모듈의 `build.gradle`에 `framey-monitoring`을 의존성으로 추가해야 ```gradle dependencies { - implementation project(':common:common-monitoring') + implementation project(':framey-monitoring') } ``` @@ -67,16 +67,16 @@ spring: #### 4. Logback 설정 -`common-monitoring`에 기본 `logback-spring.xml`이 포함되어 있으므로, 별도의 Logback 파일이 없어도 공통 설정이 자동으로 각모듈에 적용됩니다. +`framey-monitoring`에 기본 `logback-spring.xml`이 포함되어 있으므로, 별도의 Logback 파일이 없어도 공통 설정이 자동으로 각모듈에 적용됩니다. 서비스에서 별도의 `logback-spring.xml`을 추가하면, -`common-monitoring`의 기본 설정 대신 해당 설정이 적용됩니다. +`framey-monitoring`의 기본 설정 대신 해당 설정이 적용됩니다. ##### (참고) 공통 Logback 설정 관련 -공통 Logback 설정파일은 `common-monitoring`내에 있습니다. +공통 Logback 설정파일은 `framey-monitoring`내에 있습니다. ```text -common/common-monitoring/ +framey-monitoring/ └── src/main/resources/ └── logback-spring.xml ``` diff --git a/framey-common/common-jpa/build.gradle b/framey-common/build.gradle similarity index 62% rename from framey-common/common-jpa/build.gradle rename to framey-common/build.gradle index a0189fc..cdfbe13 100644 --- a/framey-common/common-jpa/build.gradle +++ b/framey-common/build.gradle @@ -4,4 +4,5 @@ plugins { dependencies { api 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.springframework.boot:spring-boot-starter-web' } diff --git a/framey-common/common-monitoring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/framey-common/common-monitoring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index 2fefcf9..0000000 --- a/framey-common/common-monitoring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1 +0,0 @@ -framey.common.config.MonitoringAutoConfiguration \ No newline at end of file diff --git a/framey-common/common-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/framey-common/common-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index a72b15c..0000000 --- a/framey-common/common-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1 +0,0 @@ -framey.common.config.SwaggerConfig diff --git a/framey-common/common-web/src/main/java/framey/common/exception/BusinessException.java b/framey-common/src/main/java/framey/common/exception/BusinessException.java similarity index 100% rename from framey-common/common-web/src/main/java/framey/common/exception/BusinessException.java rename to framey-common/src/main/java/framey/common/exception/BusinessException.java diff --git a/framey-common/common-web/src/main/java/framey/common/exception/CommonErrorCode.java b/framey-common/src/main/java/framey/common/exception/CommonErrorCode.java similarity index 100% rename from framey-common/common-web/src/main/java/framey/common/exception/CommonErrorCode.java rename to framey-common/src/main/java/framey/common/exception/CommonErrorCode.java diff --git a/framey-common/common-web/src/main/java/framey/common/exception/ServiceUnavailableException.java b/framey-common/src/main/java/framey/common/exception/ServiceUnavailableException.java similarity index 100% rename from framey-common/common-web/src/main/java/framey/common/exception/ServiceUnavailableException.java rename to framey-common/src/main/java/framey/common/exception/ServiceUnavailableException.java diff --git a/framey-common/common-jpa/src/main/java/framey/db/entity/BaseEntity.java b/framey-common/src/main/java/framey/common/jpa/BaseEntity.java similarity index 96% rename from framey-common/common-jpa/src/main/java/framey/db/entity/BaseEntity.java rename to framey-common/src/main/java/framey/common/jpa/BaseEntity.java index e66be4c..a68b2d5 100644 --- a/framey-common/common-jpa/src/main/java/framey/db/entity/BaseEntity.java +++ b/framey-common/src/main/java/framey/common/jpa/BaseEntity.java @@ -1,4 +1,4 @@ -package framey.db.entity; +package framey.common.jpa; import jakarta.persistence.Column; import jakarta.persistence.MappedSuperclass; diff --git a/framey-common/common-web/src/main/java/framey/common/response/ApiResponse.java b/framey-common/src/main/java/framey/common/response/ApiResponse.java similarity index 100% rename from framey-common/common-web/src/main/java/framey/common/response/ApiResponse.java rename to framey-common/src/main/java/framey/common/response/ApiResponse.java diff --git a/framey-common/common-web/src/main/java/framey/common/response/ErrorCode.java b/framey-common/src/main/java/framey/common/response/ErrorCode.java similarity index 100% rename from framey-common/common-web/src/main/java/framey/common/response/ErrorCode.java rename to framey-common/src/main/java/framey/common/response/ErrorCode.java diff --git a/framey-common/common-web/src/main/java/framey/common/response/SuccessCode.java b/framey-common/src/main/java/framey/common/response/SuccessCode.java similarity index 100% rename from framey-common/common-web/src/main/java/framey/common/response/SuccessCode.java rename to framey-common/src/main/java/framey/common/response/SuccessCode.java diff --git a/framey-common/docker/local/docker-compose.local.yaml b/framey-infrastructure/docker/local/docker-compose.local.yaml similarity index 100% rename from framey-common/docker/local/docker-compose.local.yaml rename to framey-infrastructure/docker/local/docker-compose.local.yaml diff --git a/framey-common/infrastructure/swagger-dev/DockerFile b/framey-infrastructure/swagger-dev/DockerFile similarity index 100% rename from framey-common/infrastructure/swagger-dev/DockerFile rename to framey-infrastructure/swagger-dev/DockerFile diff --git a/framey-common/infrastructure/swagger-dev/swagger-config.json b/framey-infrastructure/swagger-dev/swagger-config.json similarity index 100% rename from framey-common/infrastructure/swagger-dev/swagger-config.json rename to framey-infrastructure/swagger-dev/swagger-config.json diff --git a/framey-common/common-monitoring/build.gradle b/framey-monitoring/build.gradle similarity index 100% rename from framey-common/common-monitoring/build.gradle rename to framey-monitoring/build.gradle diff --git a/framey-common/common-monitoring/src/main/java/framey/common/annotation/LogActivity.java b/framey-monitoring/src/main/java/framey/monitoring/annotation/LogActivity.java similarity index 88% rename from framey-common/common-monitoring/src/main/java/framey/common/annotation/LogActivity.java rename to framey-monitoring/src/main/java/framey/monitoring/annotation/LogActivity.java index f6606c4..2852e87 100644 --- a/framey-common/common-monitoring/src/main/java/framey/common/annotation/LogActivity.java +++ b/framey-monitoring/src/main/java/framey/monitoring/annotation/LogActivity.java @@ -1,4 +1,4 @@ -package framey.common.annotation; +package framey.monitoring.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/framey-common/common-monitoring/src/main/java/framey/common/aspect/LogActivityAspect.java b/framey-monitoring/src/main/java/framey/monitoring/aspect/LogActivityAspect.java similarity index 90% rename from framey-common/common-monitoring/src/main/java/framey/common/aspect/LogActivityAspect.java rename to framey-monitoring/src/main/java/framey/monitoring/aspect/LogActivityAspect.java index 333f446..9884f8b 100644 --- a/framey-common/common-monitoring/src/main/java/framey/common/aspect/LogActivityAspect.java +++ b/framey-monitoring/src/main/java/framey/monitoring/aspect/LogActivityAspect.java @@ -1,10 +1,10 @@ -package framey.common.aspect; +package framey.monitoring.aspect; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; -import framey.common.annotation.LogActivity; +import framey.monitoring.annotation.LogActivity; import lombok.extern.slf4j.Slf4j; @@ -33,4 +33,4 @@ public Object logActivity(ProceedingJoinPoint joinPoint, LogActivity logActivity throw e; } } -} \ No newline at end of file +} diff --git a/framey-common/common-monitoring/src/main/java/framey/common/config/MonitoringAutoConfiguration.java b/framey-monitoring/src/main/java/framey/monitoring/config/MonitoringAutoConfiguration.java similarity index 74% rename from framey-common/common-monitoring/src/main/java/framey/common/config/MonitoringAutoConfiguration.java rename to framey-monitoring/src/main/java/framey/monitoring/config/MonitoringAutoConfiguration.java index 558d5d3..32ee1e0 100644 --- a/framey-common/common-monitoring/src/main/java/framey/common/config/MonitoringAutoConfiguration.java +++ b/framey-monitoring/src/main/java/framey/monitoring/config/MonitoringAutoConfiguration.java @@ -1,7 +1,7 @@ -package framey.common.config; +package framey.monitoring.config; -import framey.common.aspect.LogActivityAspect; -import framey.common.filter.TraceIdFilter; +import framey.monitoring.aspect.LogActivityAspect; +import framey.monitoring.filter.TraceIdFilter; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Bean; diff --git a/framey-common/common-monitoring/src/main/java/framey/common/filter/TraceIdFilter.java b/framey-monitoring/src/main/java/framey/monitoring/filter/TraceIdFilter.java similarity index 96% rename from framey-common/common-monitoring/src/main/java/framey/common/filter/TraceIdFilter.java rename to framey-monitoring/src/main/java/framey/monitoring/filter/TraceIdFilter.java index 3b4b1ee..ce6cc4e 100644 --- a/framey-common/common-monitoring/src/main/java/framey/common/filter/TraceIdFilter.java +++ b/framey-monitoring/src/main/java/framey/monitoring/filter/TraceIdFilter.java @@ -1,4 +1,4 @@ -package framey.common.filter; +package framey.monitoring.filter; import java.io.IOException; import java.util.UUID; @@ -37,4 +37,4 @@ protected void doFilterInternal( MDC.remove(TRACE_ID); } } -} \ No newline at end of file +} diff --git a/framey-monitoring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/framey-monitoring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000..223a12d --- /dev/null +++ b/framey-monitoring/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +framey.monitoring.config.MonitoringAutoConfiguration diff --git a/framey-common/common-monitoring/src/main/resources/logback-spring.xml b/framey-monitoring/src/main/resources/logback-spring.xml similarity index 98% rename from framey-common/common-monitoring/src/main/resources/logback-spring.xml rename to framey-monitoring/src/main/resources/logback-spring.xml index 27f7ff3..b3a7b04 100644 --- a/framey-common/common-monitoring/src/main/resources/logback-spring.xml +++ b/framey-monitoring/src/main/resources/logback-spring.xml @@ -61,4 +61,4 @@ - \ No newline at end of file + diff --git a/framey-common/common-web/build.gradle b/framey-web/build.gradle similarity index 87% rename from framey-common/common-web/build.gradle rename to framey-web/build.gradle index 2157f49..7eb7dce 100644 --- a/framey-common/common-web/build.gradle +++ b/framey-web/build.gradle @@ -3,6 +3,8 @@ plugins { } dependencies { + api project(':framey-common') + api 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-validation' api 'org.springdoc:springdoc-openapi-starter-webmvc-ui:3.1.1' diff --git a/framey-common/common-web/src/main/java/framey/common/advice/CommonExceptionHandler.java b/framey-web/src/main/java/framey/web/advice/CommonExceptionHandler.java similarity index 99% rename from framey-common/common-web/src/main/java/framey/common/advice/CommonExceptionHandler.java rename to framey-web/src/main/java/framey/web/advice/CommonExceptionHandler.java index a4d8b7c..c12ca28 100644 --- a/framey-common/common-web/src/main/java/framey/common/advice/CommonExceptionHandler.java +++ b/framey-web/src/main/java/framey/web/advice/CommonExceptionHandler.java @@ -1,4 +1,4 @@ -package framey.common.advice; +package framey.web.advice; import framey.common.exception.BusinessException; import framey.common.exception.CommonErrorCode; diff --git a/framey-common/common-web/src/main/java/framey/common/config/CommonWebAutoConfiguration.java b/framey-web/src/main/java/framey/web/config/CommonWebAutoConfiguration.java similarity index 73% rename from framey-common/common-web/src/main/java/framey/common/config/CommonWebAutoConfiguration.java rename to framey-web/src/main/java/framey/web/config/CommonWebAutoConfiguration.java index 354c7ac..1943962 100644 --- a/framey-common/common-web/src/main/java/framey/common/config/CommonWebAutoConfiguration.java +++ b/framey-web/src/main/java/framey/web/config/CommonWebAutoConfiguration.java @@ -1,6 +1,6 @@ -package framey.common.config; +package framey.web.config; -import framey.common.advice.CommonExceptionHandler; +import framey.web.advice.CommonExceptionHandler; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.context.annotation.Import; diff --git a/framey-common/common-web/src/main/java/framey/common/config/SwaggerConfig.java b/framey-web/src/main/java/framey/web/config/SwaggerConfig.java similarity index 95% rename from framey-common/common-web/src/main/java/framey/common/config/SwaggerConfig.java rename to framey-web/src/main/java/framey/web/config/SwaggerConfig.java index 9a2c4d8..255f635 100644 --- a/framey-common/common-web/src/main/java/framey/common/config/SwaggerConfig.java +++ b/framey-web/src/main/java/framey/web/config/SwaggerConfig.java @@ -1,6 +1,6 @@ -package framey.common.config; +package framey.web.config; -import framey.common.swagger.ErrorCodeExampleCustomizer; +import framey.web.swagger.ErrorCodeExampleCustomizer; import io.swagger.v3.oas.models.Components; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; diff --git a/framey-common/common-web/src/main/java/framey/common/swagger/ErrorCodeExampleCustomizer.java b/framey-web/src/main/java/framey/web/swagger/ErrorCodeExampleCustomizer.java similarity index 93% rename from framey-common/common-web/src/main/java/framey/common/swagger/ErrorCodeExampleCustomizer.java rename to framey-web/src/main/java/framey/web/swagger/ErrorCodeExampleCustomizer.java index 3419c82..3ac0eea 100644 --- a/framey-common/common-web/src/main/java/framey/common/swagger/ErrorCodeExampleCustomizer.java +++ b/framey-web/src/main/java/framey/web/swagger/ErrorCodeExampleCustomizer.java @@ -1,9 +1,8 @@ -package framey.common.swagger; +package framey.web.swagger; import framey.common.response.ApiResponse; import framey.common.response.ErrorCode; -import framey.common.swagger.annotation.ApiErrorCodeExample; -import framey.common.swagger.annotation.PublicApi; + import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.examples.Example; import io.swagger.v3.oas.models.media.Content; @@ -38,10 +37,10 @@ private void handlePublicApi( HandlerMethod handlerMethod ) { boolean publicMethod = - handlerMethod.hasMethodAnnotation(PublicApi.class); + handlerMethod.hasMethodAnnotation(framey.common.swagger.annotation.PublicApi.class); boolean publicController = - handlerMethod.getBeanType().isAnnotationPresent(PublicApi.class); + handlerMethod.getBeanType().isAnnotationPresent(framey.common.swagger.annotation.PublicApi.class); if (publicMethod || publicController) { operation.setSecurity(new ArrayList<>()); @@ -52,8 +51,8 @@ private void handleErrorCodeExamples( Operation operation, HandlerMethod handlerMethod ) { - ApiErrorCodeExample annotation = - handlerMethod.getMethodAnnotation(ApiErrorCodeExample.class); + framey.common.swagger.annotation.ApiErrorCodeExample annotation = + handlerMethod.getMethodAnnotation(framey.common.swagger.annotation.ApiErrorCodeExample.class); if (annotation == null) { return; diff --git a/framey-common/common-web/src/main/java/framey/common/swagger/ExampleHolder.java b/framey-web/src/main/java/framey/web/swagger/ExampleHolder.java similarity index 87% rename from framey-common/common-web/src/main/java/framey/common/swagger/ExampleHolder.java rename to framey-web/src/main/java/framey/web/swagger/ExampleHolder.java index ee7a4a3..32702a1 100644 --- a/framey-common/common-web/src/main/java/framey/common/swagger/ExampleHolder.java +++ b/framey-web/src/main/java/framey/web/swagger/ExampleHolder.java @@ -1,4 +1,4 @@ -package framey.common.swagger; +package framey.web.swagger; import io.swagger.v3.oas.models.examples.Example; import lombok.Builder; diff --git a/framey-common/common-web/src/main/java/framey/common/swagger/annotation/ApiErrorCodeExample.java b/framey-web/src/main/java/framey/web/swagger/annotation/ApiErrorCodeExample.java similarity index 90% rename from framey-common/common-web/src/main/java/framey/common/swagger/annotation/ApiErrorCodeExample.java rename to framey-web/src/main/java/framey/web/swagger/annotation/ApiErrorCodeExample.java index ab38250..7262f0f 100644 --- a/framey-common/common-web/src/main/java/framey/common/swagger/annotation/ApiErrorCodeExample.java +++ b/framey-web/src/main/java/framey/web/swagger/annotation/ApiErrorCodeExample.java @@ -1,4 +1,4 @@ -package framey.common.swagger.annotation; +package framey.web.swagger.annotation; import framey.common.response.ErrorCode; import java.lang.annotation.ElementType; diff --git a/framey-common/common-web/src/main/java/framey/common/swagger/annotation/PublicApi.java b/framey-web/src/main/java/framey/web/swagger/annotation/PublicApi.java similarity index 87% rename from framey-common/common-web/src/main/java/framey/common/swagger/annotation/PublicApi.java rename to framey-web/src/main/java/framey/web/swagger/annotation/PublicApi.java index cc34eb4..e1083e4 100644 --- a/framey-common/common-web/src/main/java/framey/common/swagger/annotation/PublicApi.java +++ b/framey-web/src/main/java/framey/web/swagger/annotation/PublicApi.java @@ -1,4 +1,4 @@ -package framey.common.swagger.annotation; +package framey.web.swagger.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/framey-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/framey-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000..79ffa8b --- /dev/null +++ b/framey-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +framey.web.config.SwaggerConfig diff --git a/settings.gradle b/settings.gradle index 8cf2705..1ad3a19 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,5 +1,5 @@ rootProject.name = 'server' -include ':framey-common:common-monitoring' -include ':framey-common:common-jpa' -include ':framey-common:common-web' +include ':framey-common' +include ':framey-web' +include ':framey-monitoring' From 08d3968a8e2bcfc7cfb824ea7119dd51f1a7d929 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Mon, 12 Oct 2026 15:27:43 +0900 Subject: [PATCH 05/22] =?UTF-8?q?fix:=20Swagger=20=EA=B3=B5=ED=86=B5=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20ErrorCodeExample=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20*=20FQCN=EC=9C=BC=EB=A1=9C=20=EC=A7=81?= =?UTF-8?q?=EC=A0=91=20=EC=B0=B8=EC=A1=B0=ED=95=98=EB=8D=98=20PublicApi,?= =?UTF-8?q?=20ApiErrorCodeExample=EC=9D=84=20import=20=EB=B0=A9=EC=8B=9D?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD=20*=20Framey=EC=99=80?= =?UTF-8?q?=20Swagger=EC=9D=98=20ApiResponse=20=ED=81=B4=EB=9E=98=EC=8A=A4?= =?UTF-8?q?=EB=AA=85=20=EC=B6=A9=EB=8F=8C=EC=9D=84=20=EA=B3=A0=EB=A0=A4?= =?UTF-8?q?=ED=95=B4=20Swagger=20ApiResponse=EB=A5=BC=20import=ED=95=98?= =?UTF-8?q?=EA=B3=A0=20=EA=B3=B5=ED=86=B5=20=EC=9D=91=EB=8B=B5=EC=9D=80=20?= =?UTF-8?q?FQCN=EC=9C=BC=EB=A1=9C=20=EB=AA=85=EC=8B=9C=20*=20ErrorCode=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84=EC=B2=B4=EC=9D=98=20enum=20=ED=83=80?= =?UTF-8?q?=EC=9E=85=20=EA=B2=80=EC=A6=9D=20=EB=A9=94=EC=8B=9C=EC=A7=80?= =?UTF-8?q?=EB=A5=BC=20=EC=83=81=EC=88=98=ED=99=94=20*=20include=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=EC=9D=84=20Set=EC=9C=BC=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/advice/CommonExceptionHandler.java | 5 +-- .../swagger/ErrorCodeExampleCustomizer.java | 35 ++++++++++--------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/framey-web/src/main/java/framey/web/advice/CommonExceptionHandler.java b/framey-web/src/main/java/framey/web/advice/CommonExceptionHandler.java index c12ca28..c6597c0 100644 --- a/framey-web/src/main/java/framey/web/advice/CommonExceptionHandler.java +++ b/framey-web/src/main/java/framey/web/advice/CommonExceptionHandler.java @@ -49,10 +49,7 @@ public ResponseEntity> handleBusinessException( final BusinessException e ) { log.warn( - "{} 발생! errorCode={}", - e.getClass().getSimpleName(), - e.getErrorCode().getValue(), - e + "{} 발생! errorCode={}", e.getClass().getSimpleName(), e.getErrorCode().getValue(), e ); return ResponseEntity.status(e.getErrorCode().getHttpStatus()) .body(fail(e.getErrorCode())); diff --git a/framey-web/src/main/java/framey/web/swagger/ErrorCodeExampleCustomizer.java b/framey-web/src/main/java/framey/web/swagger/ErrorCodeExampleCustomizer.java index 3ac0eea..1ae852d 100644 --- a/framey-web/src/main/java/framey/web/swagger/ErrorCodeExampleCustomizer.java +++ b/framey-web/src/main/java/framey/web/swagger/ErrorCodeExampleCustomizer.java @@ -1,12 +1,14 @@ package framey.web.swagger; -import framey.common.response.ApiResponse; import framey.common.response.ErrorCode; +import framey.web.swagger.annotation.ApiErrorCodeExample; +import framey.web.swagger.annotation.PublicApi; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.examples.Example; import io.swagger.v3.oas.models.media.Content; import io.swagger.v3.oas.models.media.MediaType; +import io.swagger.v3.oas.models.responses.ApiResponse; import io.swagger.v3.oas.models.responses.ApiResponses; import org.springdoc.core.customizers.OperationCustomizer; import org.springframework.web.method.HandlerMethod; @@ -15,11 +17,13 @@ import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; public class ErrorCodeExampleCustomizer implements OperationCustomizer { private static final String APPLICATION_JSON = "application/json"; + private static final String ENUM_TYPE_REQUIRED_MESSAGE = "ErrorCode 구현체는 enum 타입이어야 합니다."; @Override public Operation customize( @@ -37,10 +41,10 @@ private void handlePublicApi( HandlerMethod handlerMethod ) { boolean publicMethod = - handlerMethod.hasMethodAnnotation(framey.common.swagger.annotation.PublicApi.class); + handlerMethod.hasMethodAnnotation(PublicApi.class); boolean publicController = - handlerMethod.getBeanType().isAnnotationPresent(framey.common.swagger.annotation.PublicApi.class); + handlerMethod.getBeanType().isAnnotationPresent(PublicApi.class); if (publicMethod || publicController) { operation.setSecurity(new ArrayList<>()); @@ -51,14 +55,14 @@ private void handleErrorCodeExamples( Operation operation, HandlerMethod handlerMethod ) { - framey.common.swagger.annotation.ApiErrorCodeExample annotation = - handlerMethod.getMethodAnnotation(framey.common.swagger.annotation.ApiErrorCodeExample.class); + ApiErrorCodeExample annotation = + handlerMethod.getMethodAnnotation(ApiErrorCodeExample.class); if (annotation == null) { return; } - List includes = Arrays.asList(annotation.include()); + Set includes = Set.of(annotation.include()); List exampleHolders = Arrays.stream(annotation.value()) @@ -85,10 +89,7 @@ private void handleErrorCodeExamples( operation.setResponses(responses); } - addExamplesToResponses( - responses, - examplesByStatus - ); + addExamplesToResponses(responses, examplesByStatus); } private List getErrorCodes( @@ -98,7 +99,8 @@ private List getErrorCodes( if (constants == null) { throw new IllegalArgumentException( - "ErrorCode 구현체는 enum이어야 합니다: " + ENUM_TYPE_REQUIRED_MESSAGE + + " type=" + type.getName() ); } @@ -111,7 +113,7 @@ private List getErrorCodes( private String getEnumName(ErrorCode errorCode) { if (!(errorCode instanceof Enum enumValue)) { throw new IllegalArgumentException( - "ErrorCode 구현체는 enum이어야 합니다." + ENUM_TYPE_REQUIRED_MESSAGE ); } @@ -132,7 +134,7 @@ private Example createExample(ErrorCode errorCode) { Example example = new Example(); example.setValue( - ApiResponse.fail(errorCode) + framey.common.response.ApiResponse.fail(errorCode) ); return example; @@ -145,10 +147,10 @@ private void addExamplesToResponses( examplesByStatus.forEach((status, exampleHolders) -> { String statusCode = String.valueOf(status); - io.swagger.v3.oas.models.responses.ApiResponse response = + ApiResponse response = responses.computeIfAbsent( statusCode, - key -> new io.swagger.v3.oas.models.responses.ApiResponse() + key -> new ApiResponse() .description("Error Response") ); @@ -160,7 +162,8 @@ private void addExamplesToResponses( if (mediaType == null) { mediaType = new MediaType(); - response.getContent().addMediaType(APPLICATION_JSON, mediaType); + response.getContent() + .addMediaType(APPLICATION_JSON, mediaType); } for (ExampleHolder exampleHolder : exampleHolders) { From 53db4c15c9fee4402c192bd352729c7e2980a147 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Mon, 12 Oct 2026 16:34:26 +0900 Subject: [PATCH 06/22] =?UTF-8?q?fest:=20user-service=20=EB=AA=A8=EB=93=88?= =?UTF-8?q?=20=EC=83=9D=EC=84=B1=20*=20member-service=20=EA=B8=B0=EB=B3=B8?= =?UTF-8?q?=20=ED=8C=A8=ED=82=A4=EC=A7=80=20=EB=B0=8F=20Spring=20Boot=20?= =?UTF-8?q?=EC=95=A0=ED=94=8C=EB=A6=AC=EC=BC=80=EC=9D=B4=EC=85=98=20?= =?UTF-8?q?=EA=B5=AC=EC=84=B1=20*=20=EB=A1=9C=EC=BB=AC=20PostgreSQL=20?= =?UTF-8?q?=EC=8B=A4=ED=96=89=EC=9D=84=20=EC=9C=84=ED=95=9C=20docker-compo?= =?UTF-8?q?se-local=20=EC=88=98=EC=A0=95=20=EB=B0=8F=20DB=20=EC=A0=95?= =?UTF-8?q?=EB=B3=B4=20=ED=99=98=EA=B2=BD=20=EB=B3=80=EC=88=98=EB=A1=9C=20?= =?UTF-8?q?=EB=B6=84=EB=A6=AC=20*=20DB=20=ED=98=B8=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=ED=8F=AC=ED=8A=B8=EB=A5=BC=205433=EC=9C=BC=EB=A1=9C=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20*=20env=20=ED=8C=8C=EC=9D=BC=20.gitignore?= =?UTF-8?q?=EC=97=90=20=ED=8F=AC=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +++- framey-application/member-service/build.gradle | 13 +++++++++++++ .../framey/member/MemberServiceApplication.java | 15 +++++++++++++++ .../src/main/resources/application-local.yaml | 14 ++++++++++++++ .../src/main/resources/application.yaml | 11 +++++++++++ .../docker/local/docker-compose.local.yaml | 14 +++++++++----- ...k.boot.autoconfigure.AutoConfiguration.imports | 1 + settings.gradle | 1 + 8 files changed, 67 insertions(+), 6 deletions(-) create mode 100644 framey-application/member-service/build.gradle create mode 100644 framey-application/member-service/src/main/java/framey/member/MemberServiceApplication.java create mode 100644 framey-application/member-service/src/main/resources/application-local.yaml create mode 100644 framey-application/member-service/src/main/resources/application.yaml diff --git a/.gitignore b/.gitignore index 60bb4a3..76cfe8b 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,8 @@ bin/ .env .env.* !.env.example +### env 폴더 추적 제외 ### +framey-env/ ### OS ### .DS_Store @@ -46,4 +48,4 @@ Thumbs.db logs/ ### Local Docker Data ### -**/docker/**/data/ \ No newline at end of file +**/docker/**/data/ diff --git a/framey-application/member-service/build.gradle b/framey-application/member-service/build.gradle new file mode 100644 index 0000000..950f36d --- /dev/null +++ b/framey-application/member-service/build.gradle @@ -0,0 +1,13 @@ +plugins { + id 'org.springframework.boot' + id 'java-library' +} + +dependencies { + api project(':framey-common') + api project(':framey-web') + implementation project(":framey-monitoring") + + //postgreSQL + runtimeOnly("org.postgresql:postgresql") +} diff --git a/framey-application/member-service/src/main/java/framey/member/MemberServiceApplication.java b/framey-application/member-service/src/main/java/framey/member/MemberServiceApplication.java new file mode 100644 index 0000000..fb3ef82 --- /dev/null +++ b/framey-application/member-service/src/main/java/framey/member/MemberServiceApplication.java @@ -0,0 +1,15 @@ +package framey.member; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.properties.ConfigurationPropertiesScan; + +@ConfigurationPropertiesScan +@SpringBootApplication( + scanBasePackages = "framey.member" +) +public class MemberServiceApplication { + public static void main(String[] args) { + SpringApplication.run(MemberServiceApplication.class, args); + } +} diff --git a/framey-application/member-service/src/main/resources/application-local.yaml b/framey-application/member-service/src/main/resources/application-local.yaml new file mode 100644 index 0000000..251c374 --- /dev/null +++ b/framey-application/member-service/src/main/resources/application-local.yaml @@ -0,0 +1,14 @@ +spring: + datasource: + url: ${LOCAL_DB_URL:-jdbc:postgresql://localhost:5433/framey_local} + username: ${LOCAL_DB_USERNAME:-root} + password: ${LOCAL_DB_PASSWORD:-root12345} + driver-class-name: org.postgresql.Driver + jpa: + hibernate: + ddl-auto: update + open-in-view: false + properties: + hibernate: + format_sql: true + show_sql: true diff --git a/framey-application/member-service/src/main/resources/application.yaml b/framey-application/member-service/src/main/resources/application.yaml new file mode 100644 index 0000000..383a600 --- /dev/null +++ b/framey-application/member-service/src/main/resources/application.yaml @@ -0,0 +1,11 @@ +spring: + application: + name: member-service + profiles: + active: local +server: + port: 8081 +#swagger +springdoc: + api-docs: + enabled: true diff --git a/framey-infrastructure/docker/local/docker-compose.local.yaml b/framey-infrastructure/docker/local/docker-compose.local.yaml index f4aa977..0978341 100644 --- a/framey-infrastructure/docker/local/docker-compose.local.yaml +++ b/framey-infrastructure/docker/local/docker-compose.local.yaml @@ -4,18 +4,22 @@ services: container_name: framey-local-postgres ports: - - "5432:5432" + - "5433:5432" environment: - POSTGRES_DB: framey_local - POSTGRES_USER: root - POSTGRES_PASSWORD: root + POSTGRES_DB: ${LOCAL_DB_NAME:-framey_local} + POSTGRES_USER: ${LOCAL_DB_USER:-root} + POSTGRES_PASSWORD: ${LOCAL_DB_PASSWORD:-root12345} volumes: - framey-postgres-data:/var/lib/postgresql/data healthcheck: - test: ["CMD-SHELL", "pg_isready -U root -d framey_local"] + test: + [ + "CMD-SHELL", + "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}" + ] interval: 10s timeout: 5s retries: 5 diff --git a/framey-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/framey-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports index 79ffa8b..b9b57ca 100644 --- a/framey-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ b/framey-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -1 +1,2 @@ framey.web.config.SwaggerConfig +framey.web.config.CommonWebAutoConfiguration diff --git a/settings.gradle b/settings.gradle index 1ad3a19..00a7408 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,3 +3,4 @@ rootProject.name = 'server' include ':framey-common' include ':framey-web' include ':framey-monitoring' +include ':framey-application:member-service' From 2534037ff0aad97298848caa017a594fd9b45745 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Wed, 14 Oct 2026 15:19:29 +0900 Subject: [PATCH 07/22] =?UTF-8?q?feat:=20MemberService=20Test=20=EC=8B=A4?= =?UTF-8?q?=ED=96=89=20=EB=AA=A8=EB=93=88=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framey/member/MemberServiceApplicationTests.java | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 framey-application/member-service/src/test/java/framey/member/MemberServiceApplicationTests.java diff --git a/framey-application/member-service/src/test/java/framey/member/MemberServiceApplicationTests.java b/framey-application/member-service/src/test/java/framey/member/MemberServiceApplicationTests.java new file mode 100644 index 0000000..ca18cd3 --- /dev/null +++ b/framey-application/member-service/src/test/java/framey/member/MemberServiceApplicationTests.java @@ -0,0 +1,11 @@ +package framey.member; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class MemberServiceApplicationTests { + @Test + void contextLoads() { + } +} From f6dd836e7c3ecba762f6dfbfbcf8590d5aa5f3ae Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Fri, 16 Oct 2026 21:32:14 +0900 Subject: [PATCH 08/22] =?UTF-8?q?fix:=20MemberService=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=8B=A4=ED=96=89=20=EB=AA=A8=EB=93=88=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20=ED=95=B4=EA=B2=B0=20*=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EB=AA=A8=EB=93=88=20=EC=8B=A4=ED=96=89=20=EC=8B=9C?= =?UTF-8?q?=20=EB=8D=B0=EC=9D=B4=ED=84=B0=EB=B2=A0=EC=9D=B4=EC=8A=A4=20?= =?UTF-8?q?=EC=97=B0=EA=B2=B0=20=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * PostgreSQL과 H2 간 호환성 문제로 H2가 아닌 Local 데이터베이스에 연결 * 추후 필요에 따라 테스트 환경 분리 예정 * swagger 문서 내 서비스명 변경 ( mypage → archive ) --- framey-application/member-service/build.gradle | 5 ++++- .../framey/member/MemberServiceApplication.java | 4 +--- .../member/MemberServiceApplicationTests.java | 2 ++ .../src/test/resources/application-test.yaml | 15 +++++++++++++++ .../swagger-dev/swagger-config.json | 4 ++-- settings.gradle | 1 + 6 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 framey-application/member-service/src/test/resources/application-test.yaml diff --git a/framey-application/member-service/build.gradle b/framey-application/member-service/build.gradle index 950f36d..65d89fd 100644 --- a/framey-application/member-service/build.gradle +++ b/framey-application/member-service/build.gradle @@ -9,5 +9,8 @@ dependencies { implementation project(":framey-monitoring") //postgreSQL - runtimeOnly("org.postgresql:postgresql") + runtimeOnly 'org.postgresql:postgresql' + + testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test' + testImplementation 'com.fasterxml.jackson.core:jackson-databind' } diff --git a/framey-application/member-service/src/main/java/framey/member/MemberServiceApplication.java b/framey-application/member-service/src/main/java/framey/member/MemberServiceApplication.java index fb3ef82..fa35db5 100644 --- a/framey-application/member-service/src/main/java/framey/member/MemberServiceApplication.java +++ b/framey-application/member-service/src/main/java/framey/member/MemberServiceApplication.java @@ -5,9 +5,7 @@ import org.springframework.boot.context.properties.ConfigurationPropertiesScan; @ConfigurationPropertiesScan -@SpringBootApplication( - scanBasePackages = "framey.member" -) +@SpringBootApplication public class MemberServiceApplication { public static void main(String[] args) { SpringApplication.run(MemberServiceApplication.class, args); diff --git a/framey-application/member-service/src/test/java/framey/member/MemberServiceApplicationTests.java b/framey-application/member-service/src/test/java/framey/member/MemberServiceApplicationTests.java index ca18cd3..c8d8962 100644 --- a/framey-application/member-service/src/test/java/framey/member/MemberServiceApplicationTests.java +++ b/framey-application/member-service/src/test/java/framey/member/MemberServiceApplicationTests.java @@ -2,8 +2,10 @@ import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; @SpringBootTest +@ActiveProfiles("test") class MemberServiceApplicationTests { @Test void contextLoads() { diff --git a/framey-application/member-service/src/test/resources/application-test.yaml b/framey-application/member-service/src/test/resources/application-test.yaml new file mode 100644 index 0000000..72904fb --- /dev/null +++ b/framey-application/member-service/src/test/resources/application-test.yaml @@ -0,0 +1,15 @@ +spring: + datasource: + url: ${LOCAL_DB_URL:jdbc:postgresql://localhost:5433/framey_local} + username: ${LOCAL_DB_USERNAME:root} + password: ${LOCAL_DB_PASSWORD:root12345} + driver-class-name: org.postgresql.Driver + + jpa: + hibernate: + ddl-auto: update + open-in-view: false + properties: + hibernate: + format_sql: true + show_sql: true diff --git a/framey-infrastructure/swagger-dev/swagger-config.json b/framey-infrastructure/swagger-dev/swagger-config.json index 2bbb9a0..035a33b 100644 --- a/framey-infrastructure/swagger-dev/swagger-config.json +++ b/framey-infrastructure/swagger-dev/swagger-config.json @@ -10,8 +10,8 @@ "url": "/api-docs/collage" }, { - "name": "Mypage Service", - "url": "/api-docs/mypage" + "name": "Archive Service", + "url": "/api-docs/archive" } ], "urls.primaryName": "Member Service", diff --git a/settings.gradle b/settings.gradle index 00a7408..970a0fa 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,3 +4,4 @@ include ':framey-common' include ':framey-web' include ':framey-monitoring' include ':framey-application:member-service' +include ':framey-application:collage-service' From cf0ad685b61c5473d5ab570b6eec4034e8271490 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Fri, 16 Oct 2026 21:40:21 +0900 Subject: [PATCH 09/22] =?UTF-8?q?feat:=20Collage=20=EC=84=9C=EB=B9=84?= =?UTF-8?q?=EC=8A=A4=20=EB=AA=A8=EB=93=88=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- framey-application/collage-service/build.gradle | 16 ++++++++++++++++ .../collage/CollageServiceApplication.java | 13 +++++++++++++ .../src/main/resources/application-local.yaml | 14 ++++++++++++++ .../src/main/resources/application.yaml | 11 +++++++++++ 4 files changed, 54 insertions(+) create mode 100644 framey-application/collage-service/build.gradle create mode 100644 framey-application/collage-service/src/main/java/framey/collage/CollageServiceApplication.java create mode 100644 framey-application/collage-service/src/main/resources/application-local.yaml create mode 100644 framey-application/collage-service/src/main/resources/application.yaml diff --git a/framey-application/collage-service/build.gradle b/framey-application/collage-service/build.gradle new file mode 100644 index 0000000..023fe70 --- /dev/null +++ b/framey-application/collage-service/build.gradle @@ -0,0 +1,16 @@ +plugins { + id 'org.springframework.boot' + id 'java-library' +} + +dependencies { + api project(':framey-common') + api project(':framey-web') + implementation project(":framey-monitoring") + + //postgreSQLa + runtimeOnly 'org.postgresql:postgresql' + + testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test' + testImplementation 'com.fasterxml.jackson.core:jackson-databind' +} diff --git a/framey-application/collage-service/src/main/java/framey/collage/CollageServiceApplication.java b/framey-application/collage-service/src/main/java/framey/collage/CollageServiceApplication.java new file mode 100644 index 0000000..7a0e680 --- /dev/null +++ b/framey-application/collage-service/src/main/java/framey/collage/CollageServiceApplication.java @@ -0,0 +1,13 @@ +package framey.collage; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.properties.ConfigurationPropertiesScan; + +@ConfigurationPropertiesScan +@SpringBootApplication +public class CollageServiceApplication { + public static void main(String[] args) { + SpringApplication.run(CollageServiceApplication.class, args); + } +} diff --git a/framey-application/collage-service/src/main/resources/application-local.yaml b/framey-application/collage-service/src/main/resources/application-local.yaml new file mode 100644 index 0000000..251c374 --- /dev/null +++ b/framey-application/collage-service/src/main/resources/application-local.yaml @@ -0,0 +1,14 @@ +spring: + datasource: + url: ${LOCAL_DB_URL:-jdbc:postgresql://localhost:5433/framey_local} + username: ${LOCAL_DB_USERNAME:-root} + password: ${LOCAL_DB_PASSWORD:-root12345} + driver-class-name: org.postgresql.Driver + jpa: + hibernate: + ddl-auto: update + open-in-view: false + properties: + hibernate: + format_sql: true + show_sql: true diff --git a/framey-application/collage-service/src/main/resources/application.yaml b/framey-application/collage-service/src/main/resources/application.yaml new file mode 100644 index 0000000..e38196c --- /dev/null +++ b/framey-application/collage-service/src/main/resources/application.yaml @@ -0,0 +1,11 @@ +spring: + application: + name: collage-service + profiles: + active: local +server: + port: 8082 +#swagger +springdoc: + api-docs: + enabled: true From 497005006bdad0ac91dd6516ec2766974663c835 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Sat, 17 Oct 2026 18:19:50 +0900 Subject: [PATCH 10/22] =?UTF-8?q?feat:=20CollageService=20Test=20=EC=8B=A4?= =?UTF-8?q?=ED=96=89=20=EB=AA=A8=EB=93=88=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../collage/CollageServiceApplicationTests.java | 13 +++++++++++++ .../src/test/resources/application-test.yaml | 15 +++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 framey-application/collage-service/src/test/java/framey/collage/CollageServiceApplicationTests.java create mode 100644 framey-application/collage-service/src/test/resources/application-test.yaml diff --git a/framey-application/collage-service/src/test/java/framey/collage/CollageServiceApplicationTests.java b/framey-application/collage-service/src/test/java/framey/collage/CollageServiceApplicationTests.java new file mode 100644 index 0000000..0f5188b --- /dev/null +++ b/framey-application/collage-service/src/test/java/framey/collage/CollageServiceApplicationTests.java @@ -0,0 +1,13 @@ +package framey.collage; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; + +@SpringBootTest +@ActiveProfiles("test") +class CollageServiceApplicationTests { + @Test + void contextLoads() { + } +} diff --git a/framey-application/collage-service/src/test/resources/application-test.yaml b/framey-application/collage-service/src/test/resources/application-test.yaml new file mode 100644 index 0000000..72904fb --- /dev/null +++ b/framey-application/collage-service/src/test/resources/application-test.yaml @@ -0,0 +1,15 @@ +spring: + datasource: + url: ${LOCAL_DB_URL:jdbc:postgresql://localhost:5433/framey_local} + username: ${LOCAL_DB_USERNAME:root} + password: ${LOCAL_DB_PASSWORD:root12345} + driver-class-name: org.postgresql.Driver + + jpa: + hibernate: + ddl-auto: update + open-in-view: false + properties: + hibernate: + format_sql: true + show_sql: true From d04a61e0c39026e20337d5046310c6ff2245bede Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Sun, 18 Oct 2026 03:27:02 +0900 Subject: [PATCH 11/22] =?UTF-8?q?feat:=20ArchiveService=20=EB=AA=A8?= =?UTF-8?q?=EB=93=88=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- framey-application/archive-service/build.gradle | 16 ++++++++++++++++ .../archive/ArchiveServiceApplication.java | 14 ++++++++++++++ .../src/main/resources/application-local.yaml | 15 +++++++++++++++ .../src/main/resources/application.yaml | 11 +++++++++++ .../archive/ArchiveServiceApplicationTests.java | 13 +++++++++++++ .../src/test/resources/application-test.yaml | 15 +++++++++++++++ .../src/main/resources/application-local.yaml | 11 ++++++----- .../src/main/resources/application-local.yaml | 11 ++++++----- settings.gradle | 1 + 9 files changed, 97 insertions(+), 10 deletions(-) create mode 100644 framey-application/archive-service/build.gradle create mode 100644 framey-application/archive-service/src/main/java/framey/archive/ArchiveServiceApplication.java create mode 100644 framey-application/archive-service/src/main/resources/application-local.yaml create mode 100644 framey-application/archive-service/src/main/resources/application.yaml create mode 100644 framey-application/archive-service/src/test/java/framey/archive/ArchiveServiceApplicationTests.java create mode 100644 framey-application/archive-service/src/test/resources/application-test.yaml diff --git a/framey-application/archive-service/build.gradle b/framey-application/archive-service/build.gradle new file mode 100644 index 0000000..65d89fd --- /dev/null +++ b/framey-application/archive-service/build.gradle @@ -0,0 +1,16 @@ +plugins { + id 'org.springframework.boot' + id 'java-library' +} + +dependencies { + api project(':framey-common') + api project(':framey-web') + implementation project(":framey-monitoring") + + //postgreSQL + runtimeOnly 'org.postgresql:postgresql' + + testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test' + testImplementation 'com.fasterxml.jackson.core:jackson-databind' +} diff --git a/framey-application/archive-service/src/main/java/framey/archive/ArchiveServiceApplication.java b/framey-application/archive-service/src/main/java/framey/archive/ArchiveServiceApplication.java new file mode 100644 index 0000000..750b5a0 --- /dev/null +++ b/framey-application/archive-service/src/main/java/framey/archive/ArchiveServiceApplication.java @@ -0,0 +1,14 @@ +package framey.archive; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.properties.ConfigurationPropertiesScan; + +@ConfigurationPropertiesScan +@SpringBootApplication +public class ArchiveServiceApplication { + public static void main(String[] args) { + SpringApplication.run(ArchiveServiceApplication.class, args); + } + +} diff --git a/framey-application/archive-service/src/main/resources/application-local.yaml b/framey-application/archive-service/src/main/resources/application-local.yaml new file mode 100644 index 0000000..fc5c2cb --- /dev/null +++ b/framey-application/archive-service/src/main/resources/application-local.yaml @@ -0,0 +1,15 @@ +spring: + datasource: + url: ${LOCAL_DB_URL} + username: ${LOCAL_DB_USERNAME} + password: ${LOCAL_DB_PASSWORD} + driver-class-name: org.postgresql.Driver + jpa: + hibernate: + ddl-auto: update + show-sql: true + properties: + hibernate: + format_sql: true + highlight_sql: true + default_batch_fetch_size: 100 diff --git a/framey-application/archive-service/src/main/resources/application.yaml b/framey-application/archive-service/src/main/resources/application.yaml new file mode 100644 index 0000000..a1cfa9e --- /dev/null +++ b/framey-application/archive-service/src/main/resources/application.yaml @@ -0,0 +1,11 @@ +spring: + application: + name: archive-service + profiles: + active: local +server: + port: 8083 +#swagger +springdoc: + api-docs: + enabled: true diff --git a/framey-application/archive-service/src/test/java/framey/archive/ArchiveServiceApplicationTests.java b/framey-application/archive-service/src/test/java/framey/archive/ArchiveServiceApplicationTests.java new file mode 100644 index 0000000..33f4781 --- /dev/null +++ b/framey-application/archive-service/src/test/java/framey/archive/ArchiveServiceApplicationTests.java @@ -0,0 +1,13 @@ +package framey.archive; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.ActiveProfiles; + +@SpringBootTest +@ActiveProfiles("test") +public class ArchiveServiceApplicationTests { + @Test + void contextLoads() { + } +} diff --git a/framey-application/archive-service/src/test/resources/application-test.yaml b/framey-application/archive-service/src/test/resources/application-test.yaml new file mode 100644 index 0000000..f57546e --- /dev/null +++ b/framey-application/archive-service/src/test/resources/application-test.yaml @@ -0,0 +1,15 @@ +spring: + datasource: + url: ${TEST_DB_URL} + username: ${TEST_DB_USER} + password: ${TEST_DB_PASSWORD} + driver-class-name: org.postgresql.Driver + + jpa: + hibernate: + ddl-auto: create-drop + open-in-view: false + properties: + hibernate: + format_sql: true + show_sql: true diff --git a/framey-application/collage-service/src/main/resources/application-local.yaml b/framey-application/collage-service/src/main/resources/application-local.yaml index 251c374..335ee25 100644 --- a/framey-application/collage-service/src/main/resources/application-local.yaml +++ b/framey-application/collage-service/src/main/resources/application-local.yaml @@ -1,14 +1,15 @@ spring: datasource: - url: ${LOCAL_DB_URL:-jdbc:postgresql://localhost:5433/framey_local} - username: ${LOCAL_DB_USERNAME:-root} - password: ${LOCAL_DB_PASSWORD:-root12345} + url: ${LOCAL_DB_URl} + username: ${LOCAL_DB_USERNAME} + password: ${LOCAL_DB_PASSWORD} driver-class-name: org.postgresql.Driver jpa: hibernate: ddl-auto: update - open-in-view: false + show-sql: true properties: hibernate: format_sql: true - show_sql: true + highlight_sql: true + default_batch_fetch_size: 100 diff --git a/framey-application/member-service/src/main/resources/application-local.yaml b/framey-application/member-service/src/main/resources/application-local.yaml index 251c374..fc5c2cb 100644 --- a/framey-application/member-service/src/main/resources/application-local.yaml +++ b/framey-application/member-service/src/main/resources/application-local.yaml @@ -1,14 +1,15 @@ spring: datasource: - url: ${LOCAL_DB_URL:-jdbc:postgresql://localhost:5433/framey_local} - username: ${LOCAL_DB_USERNAME:-root} - password: ${LOCAL_DB_PASSWORD:-root12345} + url: ${LOCAL_DB_URL} + username: ${LOCAL_DB_USERNAME} + password: ${LOCAL_DB_PASSWORD} driver-class-name: org.postgresql.Driver jpa: hibernate: ddl-auto: update - open-in-view: false + show-sql: true properties: hibernate: format_sql: true - show_sql: true + highlight_sql: true + default_batch_fetch_size: 100 diff --git a/settings.gradle b/settings.gradle index 970a0fa..d8e1b3d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -5,3 +5,4 @@ include ':framey-web' include ':framey-monitoring' include ':framey-application:member-service' include ':framey-application:collage-service' +include ':framey-application:archive-service' From 8b2882adeb7252e6a202fed0d03e72d12bd4dba4 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Sun, 18 Oct 2026 03:40:55 +0900 Subject: [PATCH 12/22] =?UTF-8?q?chore:=20Local/Test=20PostgreSQL=20?= =?UTF-8?q?=EA=B0=9C=EB=B0=9C=20=ED=99=98=EA=B2=BD=20=EB=B6=84=EB=A6=AC=20?= =?UTF-8?q?=EB=B0=8F=20Docker=20Compose=20=EA=B5=AC=EC=84=B1=20*=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=A0=84=EC=9A=A9=20PostgreSQL?= =?UTF-8?q?=20Docker=20Compose=20=EC=B6=94=EA=B0=80=20*=20Local/Test=20?= =?UTF-8?q?=ED=99=98=EA=B2=BD=EB=B3=84=20PostgreSQL=20=EC=BB=A8=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EB=84=88=20=EB=B0=8F=20=ED=8F=AC=ED=8A=B8=20=EB=B6=84?= =?UTF-8?q?=EB=A6=AC=20(5433/5434)=20*=20=ED=99=98=EA=B2=BD=EB=B3=84=20.en?= =?UTF-8?q?v=20=ED=8C=8C=EC=9D=BC=EC=9D=84=20=ED=86=B5=ED=95=9C=20DB=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EA=B4=80=EB=A6=AC=20*=20PostgreSQL=20pg?= =?UTF-8?q?=5Fisready=20=EA=B8=B0=EB=B0=98=20Healthcheck=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-local.yaml | 2 +- .../src/main/resources/application-local.yaml | 2 +- .../src/test/resources/application-test.yaml | 6 ++-- .../src/main/resources/application-local.yaml | 2 +- .../src/test/resources/application-test.yaml | 8 ++--- .../docker/local/docker-compose.local.yaml | 8 +++-- .../docker/local/docker-compose.test.yaml | 31 +++++++++++++++++++ 7 files changed, 46 insertions(+), 13 deletions(-) create mode 100644 framey-infrastructure/docker/local/docker-compose.test.yaml diff --git a/framey-application/archive-service/src/main/resources/application-local.yaml b/framey-application/archive-service/src/main/resources/application-local.yaml index fc5c2cb..369a11a 100644 --- a/framey-application/archive-service/src/main/resources/application-local.yaml +++ b/framey-application/archive-service/src/main/resources/application-local.yaml @@ -1,7 +1,7 @@ spring: datasource: url: ${LOCAL_DB_URL} - username: ${LOCAL_DB_USERNAME} + username: ${LOCAL_DB_USER} password: ${LOCAL_DB_PASSWORD} driver-class-name: org.postgresql.Driver jpa: diff --git a/framey-application/collage-service/src/main/resources/application-local.yaml b/framey-application/collage-service/src/main/resources/application-local.yaml index 335ee25..38df6cb 100644 --- a/framey-application/collage-service/src/main/resources/application-local.yaml +++ b/framey-application/collage-service/src/main/resources/application-local.yaml @@ -1,7 +1,7 @@ spring: datasource: url: ${LOCAL_DB_URl} - username: ${LOCAL_DB_USERNAME} + username: ${LOCAL_DB_USER} password: ${LOCAL_DB_PASSWORD} driver-class-name: org.postgresql.Driver jpa: diff --git a/framey-application/collage-service/src/test/resources/application-test.yaml b/framey-application/collage-service/src/test/resources/application-test.yaml index 72904fb..73b48ad 100644 --- a/framey-application/collage-service/src/test/resources/application-test.yaml +++ b/framey-application/collage-service/src/test/resources/application-test.yaml @@ -1,8 +1,8 @@ spring: datasource: - url: ${LOCAL_DB_URL:jdbc:postgresql://localhost:5433/framey_local} - username: ${LOCAL_DB_USERNAME:root} - password: ${LOCAL_DB_PASSWORD:root12345} + url: ${TEST_DB_URL} + username: ${TEST_DB_USER} + password: ${TEST_DB_PASSWORD} driver-class-name: org.postgresql.Driver jpa: diff --git a/framey-application/member-service/src/main/resources/application-local.yaml b/framey-application/member-service/src/main/resources/application-local.yaml index fc5c2cb..369a11a 100644 --- a/framey-application/member-service/src/main/resources/application-local.yaml +++ b/framey-application/member-service/src/main/resources/application-local.yaml @@ -1,7 +1,7 @@ spring: datasource: url: ${LOCAL_DB_URL} - username: ${LOCAL_DB_USERNAME} + username: ${LOCAL_DB_USER} password: ${LOCAL_DB_PASSWORD} driver-class-name: org.postgresql.Driver jpa: diff --git a/framey-application/member-service/src/test/resources/application-test.yaml b/framey-application/member-service/src/test/resources/application-test.yaml index 72904fb..f57546e 100644 --- a/framey-application/member-service/src/test/resources/application-test.yaml +++ b/framey-application/member-service/src/test/resources/application-test.yaml @@ -1,13 +1,13 @@ spring: datasource: - url: ${LOCAL_DB_URL:jdbc:postgresql://localhost:5433/framey_local} - username: ${LOCAL_DB_USERNAME:root} - password: ${LOCAL_DB_PASSWORD:root12345} + url: ${TEST_DB_URL} + username: ${TEST_DB_USER} + password: ${TEST_DB_PASSWORD} driver-class-name: org.postgresql.Driver jpa: hibernate: - ddl-auto: update + ddl-auto: create-drop open-in-view: false properties: hibernate: diff --git a/framey-infrastructure/docker/local/docker-compose.local.yaml b/framey-infrastructure/docker/local/docker-compose.local.yaml index 0978341..4db6229 100644 --- a/framey-infrastructure/docker/local/docker-compose.local.yaml +++ b/framey-infrastructure/docker/local/docker-compose.local.yaml @@ -1,3 +1,5 @@ +name: framey-local + services: postgres: image: postgres:16-alpine @@ -7,9 +9,9 @@ services: - "5433:5432" environment: - POSTGRES_DB: ${LOCAL_DB_NAME:-framey_local} - POSTGRES_USER: ${LOCAL_DB_USER:-root} - POSTGRES_PASSWORD: ${LOCAL_DB_PASSWORD:-root12345} + POSTGRES_DB: ${LOCAL_DB_NAME} + POSTGRES_USER: ${LOCAL_DB_USER} + POSTGRES_PASSWORD: ${LOCAL_DB_PASSWORD} volumes: - framey-postgres-data:/var/lib/postgresql/data diff --git a/framey-infrastructure/docker/local/docker-compose.test.yaml b/framey-infrastructure/docker/local/docker-compose.test.yaml new file mode 100644 index 0000000..dc42506 --- /dev/null +++ b/framey-infrastructure/docker/local/docker-compose.test.yaml @@ -0,0 +1,31 @@ +name: framey-test + +services: + postgres: + image: postgres:16-alpine + container_name: framey-test-postgres + + ports: + - "5434:5432" + + environment: + POSTGRES_DB: ${TEST_DB_NAME} + POSTGRES_USER: ${TEST_DB_USER} + POSTGRES_PASSWORD: ${TEST_DB_PASSWORD} + + volumes: + - framey-test-postgres-data:/var/lib/postgresql/data + + healthcheck: + test: + [ + "CMD-SHELL", + "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}" + ] + interval: 10s + timeout: 5s + retries: 5 + start_period: 10s + +volumes: + framey-test-postgres-data: From c0256235c136a319df578103f5788894024bff85 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Mon, 19 Oct 2026 15:44:45 +0900 Subject: [PATCH 13/22] =?UTF-8?q?chore=20:=20=EC=84=9C=EB=B9=84=EC=8A=A4?= =?UTF-8?q?=EB=B3=84=20application-dev.yaml=20=EC=B6=94=EA=B0=80=20*=20=20?= =?UTF-8?q?DEV=20DB=20=ED=99=98=EA=B2=BD=EB=B3=80=EC=88=98=20=EB=B0=94?= =?UTF-8?q?=EC=9D=B8=EB=94=A9=20(DEV=5FDB=5FURL,=20DEV=5FDB=5FUSER,=20DEV?= =?UTF-8?q?=5FDB=5FPASSWORD)=20*=20=20springdoc=20api-docs=20=ED=99=9C?= =?UTF-8?q?=EC=84=B1=ED=99=94,=20swagger-ui=20=EB=B9=84=ED=99=9C=EC=84=B1?= =?UTF-8?q?=ED=99=94=20*=20Actuator=20health/info=20endpoint=20=EB=85=B8?= =?UTF-8?q?=EC=B6=9C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-dev.yaml | 25 +++++++++++++++++++ .../src/main/resources/application-dev.yaml | 25 +++++++++++++++++++ .../src/main/resources/application-dev.yaml | 25 +++++++++++++++++++ .../swagger-dev/{DockerFile => Dockerfile} | 0 4 files changed, 75 insertions(+) create mode 100644 framey-application/archive-service/src/main/resources/application-dev.yaml create mode 100644 framey-application/collage-service/src/main/resources/application-dev.yaml create mode 100644 framey-application/member-service/src/main/resources/application-dev.yaml rename framey-infrastructure/swagger-dev/{DockerFile => Dockerfile} (100%) diff --git a/framey-application/archive-service/src/main/resources/application-dev.yaml b/framey-application/archive-service/src/main/resources/application-dev.yaml new file mode 100644 index 0000000..a1ea9cd --- /dev/null +++ b/framey-application/archive-service/src/main/resources/application-dev.yaml @@ -0,0 +1,25 @@ +spring: + datasource: + url: ${DEV_DB_URL} + username: ${DEV_DB_USER} + password: ${DEV_DB_PASSWORD} + + jpa: + hibernate: + ddl-auto: validate + +springdoc: + api-docs: + enabled: true + swagger-ui: + enabled: false + +management: + endpoints: + web: + exposure: + include: health,info + endpoint: + health: + probes: + enabled: true diff --git a/framey-application/collage-service/src/main/resources/application-dev.yaml b/framey-application/collage-service/src/main/resources/application-dev.yaml new file mode 100644 index 0000000..a1ea9cd --- /dev/null +++ b/framey-application/collage-service/src/main/resources/application-dev.yaml @@ -0,0 +1,25 @@ +spring: + datasource: + url: ${DEV_DB_URL} + username: ${DEV_DB_USER} + password: ${DEV_DB_PASSWORD} + + jpa: + hibernate: + ddl-auto: validate + +springdoc: + api-docs: + enabled: true + swagger-ui: + enabled: false + +management: + endpoints: + web: + exposure: + include: health,info + endpoint: + health: + probes: + enabled: true diff --git a/framey-application/member-service/src/main/resources/application-dev.yaml b/framey-application/member-service/src/main/resources/application-dev.yaml new file mode 100644 index 0000000..a1ea9cd --- /dev/null +++ b/framey-application/member-service/src/main/resources/application-dev.yaml @@ -0,0 +1,25 @@ +spring: + datasource: + url: ${DEV_DB_URL} + username: ${DEV_DB_USER} + password: ${DEV_DB_PASSWORD} + + jpa: + hibernate: + ddl-auto: validate + +springdoc: + api-docs: + enabled: true + swagger-ui: + enabled: false + +management: + endpoints: + web: + exposure: + include: health,info + endpoint: + health: + probes: + enabled: true diff --git a/framey-infrastructure/swagger-dev/DockerFile b/framey-infrastructure/swagger-dev/Dockerfile similarity index 100% rename from framey-infrastructure/swagger-dev/DockerFile rename to framey-infrastructure/swagger-dev/Dockerfile From 2b44d4d63fedba2775f5880f48759b5778cd0c03 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Mon, 19 Oct 2026 15:45:11 +0900 Subject: [PATCH 14/22] =?UTF-8?q?chore:=20=EC=84=9C=EB=B9=84=EC=8A=A4?= =?UTF-8?q?=EB=B3=84=20dockerfile=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20dev?= =?UTF-8?q?=20=ED=99=98=EA=B2=BD=20compose=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 30 +++++ framey-application/archive-service/Dockerfile | 15 +++ framey-application/collage-service/Dockerfile | 15 +++ framey-application/member-service/Dockerfile | 15 +++ .../docker/dev/docker-compose.dev.yaml | 116 ++++++++++++++++++ 5 files changed, 191 insertions(+) create mode 100644 .dockerignore create mode 100644 framey-application/archive-service/Dockerfile create mode 100644 framey-application/collage-service/Dockerfile create mode 100644 framey-application/member-service/Dockerfile create mode 100644 framey-infrastructure/docker/dev/docker-compose.dev.yaml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4df12e4 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,30 @@ +# 빌드 산출물 +build/ +out/ +**/build/ +**/out/ + +# Gradle +.gradle/ + +# IDE +.idea/ +*.iml + +# Git +.git +.gitignore + +# OS +.DS_Store + +# 환경변수 파일 제외 +framey-env/ + +# Spring Boot 로컬 설정 제외 +**/application-local.yml +**/application-local.yaml + +# 빌드에 불필요한 파일 +*.pem +*.md diff --git a/framey-application/archive-service/Dockerfile b/framey-application/archive-service/Dockerfile new file mode 100644 index 0000000..1b1aea6 --- /dev/null +++ b/framey-application/archive-service/Dockerfile @@ -0,0 +1,15 @@ +FROM eclipse-temurin:21-jdk-alpine AS build +WORKDIR /app +COPY . . +RUN chmod +x ./gradlew +RUN --mount=type=cache,target=/root/.gradle \ + ./gradlew :framey-application:archive-service:bootJar --no-daemon + +# Runtime Stage +FROM eclipse-temurin:21-jre-alpine +WORKDIR /app +COPY --from=build \ + /app/framey-application/archive-service/build/libs/*.jar \ + app.jar +EXPOSE 8083 +ENTRYPOINT ["java", "-jar", "app.jar"] diff --git a/framey-application/collage-service/Dockerfile b/framey-application/collage-service/Dockerfile new file mode 100644 index 0000000..86aecc0 --- /dev/null +++ b/framey-application/collage-service/Dockerfile @@ -0,0 +1,15 @@ +FROM eclipse-temurin:21-jdk-alpine AS build +WORKDIR /app +COPY . . +RUN chmod +x ./gradlew +RUN --mount=type=cache,target=/root/.gradle \ + ./gradlew :framey-application:collage-service:bootJar --no-daemon + +# Runtime Stage +FROM eclipse-temurin:21-jre-alpine +WORKDIR /app +COPY --from=build \ + /app/framey-application/collage-service/build/libs/*.jar \ + app.jar +EXPOSE 8082 +ENTRYPOINT ["java", "-jar", "app.jar"] diff --git a/framey-application/member-service/Dockerfile b/framey-application/member-service/Dockerfile new file mode 100644 index 0000000..c3d3d71 --- /dev/null +++ b/framey-application/member-service/Dockerfile @@ -0,0 +1,15 @@ +FROM eclipse-temurin:21-jdk-alpine AS build +WORKDIR /app +COPY . . +RUN chmod +x ./gradlew +RUN --mount=type=cache,target=/root/.gradle \ + ./gradlew :framey-application:member-service:bootJar --no-daemon +# Runtime Stage +FROM eclipse-temurin:21-jre-alpine +WORKDIR /app +COPY --from=build \ + /app/framey-application/member-service/build/libs/*.jar \ + app.jar + +EXPOSE 8081 +ENTRYPOINT ["java", "-jar", "app.jar"] diff --git a/framey-infrastructure/docker/dev/docker-compose.dev.yaml b/framey-infrastructure/docker/dev/docker-compose.dev.yaml new file mode 100644 index 0000000..1763052 --- /dev/null +++ b/framey-infrastructure/docker/dev/docker-compose.dev.yaml @@ -0,0 +1,116 @@ +name: framey-dev + +services: + member-dev: + build: + context: ../../.. + dockerfile: framey-application/member-service/Dockerfile + image: framey-member:dev + container_name: framey-dev-member + restart: unless-stopped + environment: + SPRING_PROFILES_ACTIVE: dev + SERVER_PORT: 8081 + DEV_DB_URL: ${DEV_DB_URL} + DEV_DB_USER: ${DEV_DB_USER} + DEV_DB_PASSWORD: ${DEV_DB_PASSWORD} + networks: + - framey-dev + healthcheck: + test: + [ + "CMD-SHELL", + "wget -qO- http://localhost:8081/actuator/health || exit 1" + ] + interval: 15s + timeout: 5s + retries: 10 + start_period: 40s + + collage-dev: + build: + context: ../../.. + dockerfile: framey-application/collage-service/Dockerfile + image: framey-collage:dev + container_name: framey-dev-collage + restart: unless-stopped + environment: + SPRING_PROFILES_ACTIVE: dev + SERVER_PORT: 8082 + DEV_DB_URL: ${DEV_DB_URL} + DEV_DB_USER: ${DEV_DB_USER} + DEV_DB_PASSWORD: ${DEV_DB_PASSWORD} + networks: + - framey-dev + healthcheck: + test: + [ + "CMD-SHELL", + "wget -qO- http://localhost:8082/actuator/health || exit 1" + ] + interval: 15s + timeout: 5s + retries: 10 + start_period: 40s + + archive-dev: + build: + context: ../../.. + dockerfile: framey-application/archive-service/Dockerfile + image: framey-archive:dev + container_name: framey-dev-archive + restart: unless-stopped + environment: + SPRING_PROFILES_ACTIVE: dev + SERVER_PORT: 8083 + DEV_DB_URL: ${DEV_DB_URL} + DEV_DB_USER: ${DEV_DB_USER} + DEV_DB_PASSWORD: ${DEV_DB_PASSWORD} + networks: + - framey-dev + healthcheck: + test: + [ + "CMD-SHELL", + "wget -qO- http://localhost:8083/actuator/health || exit 1" + ] + interval: 15s + timeout: 5s + retries: 10 + start_period: 40s + + swagger-dev: + build: + context: ../../swagger-dev + dockerfile: DockerFile + container_name: framey-dev-swagger + restart: unless-stopped + networks: + - framey-dev + + nginx: + image: nginx:1.27-alpine + container_name: framey-dev-nginx + restart: unless-stopped + ports: + - "80:80" + - "443:443" + volumes: + - ../../nginx/dev/default.conf:/etc/nginx/conf.d/default.conf:ro + - /etc/letsencrypt:/etc/letsencrypt:ro + - /var/www/certbot:/var/www/certbot:ro + depends_on: + member-dev: + condition: service_healthy + collage-dev: + condition: service_healthy + archive-dev: + condition: service_healthy + swagger-dev: + condition: service_started + networks: + - framey-dev + +networks: + framey-dev: + name: framey-dev From 79000576f061d673c95a3cd13a3d0e522220bc57 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Mon, 19 Oct 2026 15:52:57 +0900 Subject: [PATCH 15/22] =?UTF-8?q?feat:=20Nginx=20=EB=A6=AC=EB=B2=84?= =?UTF-8?q?=EC=8A=A4=20=ED=94=84=EB=A1=9D=EC=8B=9C=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20*=20=20HTTP=20=E2=86=92=20HTTPS=20301=20?= =?UTF-8?q?=EB=A6=AC=EB=8B=A4=EC=9D=B4=EB=A0=89=ED=8A=B8=20*=20OpenAPI=20J?= =?UTF-8?q?SON=20=ED=94=84=EB=A1=9D=EC=8B=9C=20(/api-docs/*=20=E2=86=92=20?= =?UTF-8?q?=EA=B0=81=20=EC=84=9C=EB=B9=84=EC=8A=A4=20/v3/api-docs)=20*=20?= =?UTF-8?q?=EC=84=9C=EB=B9=84=EC=8A=A4=EB=B3=84=20API=20=ED=94=84=EB=A1=9D?= =?UTF-8?q?=EC=8B=9C=20(swagger=20=EB=AC=B8=EC=84=9C=20=EB=82=B4=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8)=20*=20Swagger=20UI=20=EA=B8=B0?= =?UTF-8?q?=EB=B3=B8=20=EB=9D=BC=EC=9A=B0=ED=8C=85=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- framey-infrastructure/nginx/dev/default.conf | 122 +++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 framey-infrastructure/nginx/dev/default.conf diff --git a/framey-infrastructure/nginx/dev/default.conf b/framey-infrastructure/nginx/dev/default.conf new file mode 100644 index 0000000..534e17b --- /dev/null +++ b/framey-infrastructure/nginx/dev/default.conf @@ -0,0 +1,122 @@ +# HTTP → HTTPS +server { + listen 80; + server_name dev-swagger.framey.kr; + + location /.well-known/acme-challenge/ { + root /var/www/certbot; + } + + location / { + return 301 https://$host$request_uri; + } +} + +# HTTPS +server { + listen 443 ssl; + http2 on; + + server_name dev-swagger.framey.kr; + + ssl_certificate /etc/letsencrypt/live/dev-swagger.framey.kr/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/dev-swagger.framey.kr/privkey.pem; + + # ========================= + # OpenAPI + # ========================= + location = /api-docs/member { + proxy_pass http://member-dev:8081/v3/api-docs; + + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + } + + location = /api-docs/collage { + proxy_pass http://collage-dev:8082/v3/api-docs; + + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + } + + location = /api-docs/archive { + proxy_pass http://archive-dev:8083/v3/api-docs; + + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + } + + # ========================= + # Member Service + # ========================= + location = /api/v1/members { + proxy_pass http://member-dev:8081; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + + location ^~ /api/v1/members/ { + proxy_pass http://member-dev:8081; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + + # ========================= + # Collage Service + # ========================= + location = /api/v1/collages { + proxy_pass http://collage-dev:8082; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + + location ^~ /api/v1/collages/ { + proxy_pass http://collage-dev:8082; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + + # ========================= + # Archive Service + # ========================= + location = /api/v1/archives { + proxy_pass http://archive-dev:8083; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + + location ^~ /api/v1/archives/ { + proxy_pass http://archive-dev:8083; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + + # ========================= + # Swagger UI + # ========================= + + location / { + proxy_pass http://swagger-dev:8080; + + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + } +} From e5c2fadca5a4ef78382faa17b183ac0738ded782 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Mon, 19 Oct 2026 17:03:12 +0900 Subject: [PATCH 16/22] =?UTF-8?q?deploy:=20dev=20=ED=99=98=EA=B2=BD=20CI/C?= =?UTF-8?q?D=20=ED=8C=8C=EC=9D=B4=ED=94=84=EB=9D=BC=EC=9D=B8=20=EA=B5=AC?= =?UTF-8?q?=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dev-deploy.yaml | 135 ++++++++++++++++++ .github/workflows/pr-ci.yaml | 23 +++ .../nginx/dev/bootstrap.conf | 14 ++ 3 files changed, 172 insertions(+) create mode 100644 .github/workflows/dev-deploy.yaml create mode 100644 .github/workflows/pr-ci.yaml create mode 100644 framey-infrastructure/nginx/dev/bootstrap.conf diff --git a/.github/workflows/dev-deploy.yaml b/.github/workflows/dev-deploy.yaml new file mode 100644 index 0000000..4c4ad00 --- /dev/null +++ b/.github/workflows/dev-deploy.yaml @@ -0,0 +1,135 @@ +name: DEV Deploy + +on: + push: + #dev 브렌치에 push 했을때 작동이지만 테스트로 임시 브렌치 변경 + branches: [chore/FBE-7-nginx-routing] + +jobs: + detect-changes: + runs-on: ubuntu-latest + outputs: + member: ${{ steps.filter.outputs.member }} + collage: ${{ steps.filter.outputs.collage }} + archive: ${{ steps.filter.outputs.archive }} + swagger: ${{ steps.filter.outputs.swagger }} + nginx: ${{ steps.filter.outputs.nginx }} + steps: + - uses: actions/checkout@v4 + + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + shared: &shared + - 'framey-common/**' + - 'framey-web/**' + - 'framey-monitoring/**' + - 'build.gradle' + - 'settings.gradle' + - 'gradle/**' + member: + - *shared + - 'framey-application/member-service/**' + collage: + - *shared + - 'framey-application/collage-service/**' + archive: + - *shared + - 'framey-application/archive-service/**' + swagger: + - 'framey-infrastructure/swagger-dev/**' + nginx: + - 'framey-infrastructure/nginx/**' + + deploy: + needs: detect-changes + runs-on: ubuntu-latest + if: | + needs.detect-changes.outputs.member == 'true' || + needs.detect-changes.outputs.collage == 'true' || + needs.detect-changes.outputs.archive == 'true' || + needs.detect-changes.outputs.swagger == 'true' || + needs.detect-changes.outputs.nginx == 'true' + + steps: + - name: Build target services list + id: targets + run: | + SERVICES="" + if [ "${{ needs.detect-changes.outputs.member }}" == "true" ]; then + SERVICES="$SERVICES member-dev" + fi + if [ "${{ needs.detect-changes.outputs.collage }}" == "true" ]; then + SERVICES="$SERVICES collage-dev" + fi + if [ "${{ needs.detect-changes.outputs.archive }}" == "true" ]; then + SERVICES="$SERVICES archive-dev" + fi + if [ "${{ needs.detect-changes.outputs.swagger }}" == "true" ]; then + SERVICES="$SERVICES swagger-dev" + fi + if [ "${{ needs.detect-changes.outputs.nginx }}" == "true" ]; then + SERVICES="$SERVICES nginx" + fi + echo "services=$SERVICES" >> $GITHUB_OUTPUT + + - name: Deploy to DEV EC2 + uses: appleboy/ssh-action@v1 + with: + host: ${{ secrets.DEV_EC2_HOST }} + username: ${{ secrets.DEV_EC2_USER }} + key: ${{ secrets.DEV_EC2_SSH_KEY }} + script: | + cd /home/ec2-user/Framey-Server + + git pull origin dev + + export DEV_DB_URL="${{ secrets.DEV_DB_URL }}" + export DEV_DB_USER="${{ secrets.DEV_DB_USER }}" + export DEV_DB_PASSWORD="${{ secrets.DEV_DB_PASSWORD }}" + + docker compose \ + -f framey-infrastructure/docker/dev/docker-compose.dev.yaml \ + up -d --build --no-deps ${{ steps.targets.outputs.services }} + + - name: Health Check + uses: appleboy/ssh-action@v1 + with: + host: ${{ secrets.DEV_EC2_HOST }} + username: ${{ secrets.DEV_EC2_USER }} + script: | + sleep 30 + + SERVICES="${{ steps.targets.outputs.services }}" + + check_health() { + local name=$1 + local port=$2 + for i in $(seq 1 20); do + if docker exec framey-dev-${name} \ + wget -qO- http://localhost:${port}/actuator/health 2>/dev/null \ + | grep -q '"status":"UP"'; then + echo "✅ ${name} is healthy" + return 0 + fi + sleep 5 + done + echo "❌ ${name} health check failed" + docker logs --tail=50 framey-dev-${name} + return 1 + } + + FAILED=0 + + if echo "$SERVICES" | grep -q "member-dev"; then + check_health "member" 8081 || FAILED=1 + fi + if echo "$SERVICES" | grep -q "collage-dev"; then + check_health "collage" 8082 || FAILED=1 + fi + if echo "$SERVICES" | grep -q "archive-dev"; then + check_health "archive" 8083 || FAILED=1 + fi + + exit $FAILED diff --git a/.github/workflows/pr-ci.yaml b/.github/workflows/pr-ci.yaml new file mode 100644 index 0000000..44e9f02 --- /dev/null +++ b/.github/workflows/pr-ci.yaml @@ -0,0 +1,23 @@ +# pr 올렸을때 작동 workflow +name: PR CI + +on: + #dev 브렌치 + pull_request: + branches: [dev] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + cache: gradle + + - run: chmod +x gradlew + - run: ./gradlew clean test check --no-daemon diff --git a/framey-infrastructure/nginx/dev/bootstrap.conf b/framey-infrastructure/nginx/dev/bootstrap.conf new file mode 100644 index 0000000..3009806 --- /dev/null +++ b/framey-infrastructure/nginx/dev/bootstrap.conf @@ -0,0 +1,14 @@ +server { + listen 80; + server_name dev-swagger.framey.kr; + + location /.well-known/acme-challenge/ { + root /var/www/certbot; + try_files $uri =404; + } + + location / { + default_type text/plain; + return 200 "FRAMEY DEV HTTP OK\n"; + } +} From edf2bbe4107fd133fee3a86912f36fa47761a1c3 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Mon, 19 Oct 2026 20:57:30 +0900 Subject: [PATCH 17/22] =?UTF-8?q?fix:=20pr-ci=EC=97=90=20PostgreSQL=20?= =?UTF-8?q?=EC=84=9C=EB=B9=84=EC=8A=A4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pr-ci.yaml | 20 +++++++++++++++++++ .../docker/dev/docker-compose.dev.yaml | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-ci.yaml b/.github/workflows/pr-ci.yaml index 44e9f02..e372f79 100644 --- a/.github/workflows/pr-ci.yaml +++ b/.github/workflows/pr-ci.yaml @@ -10,6 +10,21 @@ jobs: test: runs-on: ubuntu-latest + services: + postgres: + image: postgres:16-alpine + env: + POSTGRES_DB: framey_test + POSTGRES_USER: test + POSTGRES_PASSWORD: test + ports: + - 5432:5432 + options: >- + --health-cmd "pg_isready -U test" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: - uses: actions/checkout@v4 @@ -20,4 +35,9 @@ jobs: cache: gradle - run: chmod +x gradlew + - run: ./gradlew clean test check --no-daemon + env: + TEST_DB_URL: jdbc:postgresql://localhost:5432/framey_test + TEST_DB_USER: test + TEST_DB_PASSWORD: test12345 diff --git a/framey-infrastructure/docker/dev/docker-compose.dev.yaml b/framey-infrastructure/docker/dev/docker-compose.dev.yaml index 1763052..ef29cd5 100644 --- a/framey-infrastructure/docker/dev/docker-compose.dev.yaml +++ b/framey-infrastructure/docker/dev/docker-compose.dev.yaml @@ -82,7 +82,7 @@ services: swagger-dev: build: context: ../../swagger-dev - dockerfile: DockerFile + dockerfile: Dockerfile container_name: framey-dev-swagger restart: unless-stopped networks: From fa305d68f8b9e20575ef9cc506bab3150a1d6036 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Mon, 19 Oct 2026 22:11:06 +0900 Subject: [PATCH 18/22] =?UTF-8?q?fix:=20=20pr-ci=EC=97=90=20PostgreSQL=20?= =?UTF-8?q?=EB=B9=84=EB=B0=80=EB=B2=88=ED=98=B8=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=EB=B0=8F=20dev=20=EB=B0=B0=ED=8F=AC=20=EC=9B=8C=ED=81=AC?= =?UTF-8?q?=ED=94=8C=EB=A1=9C=EC=9A=B0=20=EC=88=98=20*=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=EC=9A=A9=20=EB=B8=8C=EB=9E=9C=EC=B9=98(chore?= =?UTF-8?q?/FBE-7-nginx-routing)=EB=A1=9C=20git=20pull=20=EB=8C=80?= =?UTF-8?q?=EC=83=81=20=EB=B3=80=EA=B2=BD=20*=20Health=20Check=20=EB=8B=A8?= =?UTF-8?q?=EA=B3=84=EC=97=90=20=EB=88=84=EB=9D=BD=EB=90=9C=20SSH=20key=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dev-deploy.yaml | 6 ++++-- .github/workflows/pr-ci.yaml | 2 +- framey-infrastructure/docker/dev/docker-compose.dev.yaml | 1 - 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dev-deploy.yaml b/.github/workflows/dev-deploy.yaml index 4c4ad00..c83fcdc 100644 --- a/.github/workflows/dev-deploy.yaml +++ b/.github/workflows/dev-deploy.yaml @@ -83,8 +83,9 @@ jobs: script: | cd /home/ec2-user/Framey-Server - git pull origin dev - + # git pull origin dev + git pull --ff-only origin chore/FBE-7-nginx-routing + export DEV_DB_URL="${{ secrets.DEV_DB_URL }}" export DEV_DB_USER="${{ secrets.DEV_DB_USER }}" export DEV_DB_PASSWORD="${{ secrets.DEV_DB_PASSWORD }}" @@ -98,6 +99,7 @@ jobs: with: host: ${{ secrets.DEV_EC2_HOST }} username: ${{ secrets.DEV_EC2_USER }} + key: ${{ secrets.DEV_EC2_SSH_KEY }} script: | sleep 30 diff --git a/.github/workflows/pr-ci.yaml b/.github/workflows/pr-ci.yaml index e372f79..de314f8 100644 --- a/.github/workflows/pr-ci.yaml +++ b/.github/workflows/pr-ci.yaml @@ -40,4 +40,4 @@ jobs: env: TEST_DB_URL: jdbc:postgresql://localhost:5432/framey_test TEST_DB_USER: test - TEST_DB_PASSWORD: test12345 + TEST_DB_PASSWORD: test diff --git a/framey-infrastructure/docker/dev/docker-compose.dev.yaml b/framey-infrastructure/docker/dev/docker-compose.dev.yaml index ef29cd5..5290652 100644 --- a/framey-infrastructure/docker/dev/docker-compose.dev.yaml +++ b/framey-infrastructure/docker/dev/docker-compose.dev.yaml @@ -87,7 +87,6 @@ services: restart: unless-stopped networks: - framey-dev - nginx: image: nginx:1.27-alpine container_name: framey-dev-nginx From b80cb0c46334a6e49ffcf0443f5b2f1c27ccc3f8 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Mon, 19 Oct 2026 22:32:51 +0900 Subject: [PATCH 19/22] =?UTF-8?q?fix:dev-deploy=20YAML=20=EA=B5=AC?= =?UTF-8?q?=EB=AC=B8=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * script 블록 내 주석 들여쓰기 수정 및 주석 제거 --- .github/workflows/dev-deploy.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/dev-deploy.yaml b/.github/workflows/dev-deploy.yaml index c83fcdc..8e572ef 100644 --- a/.github/workflows/dev-deploy.yaml +++ b/.github/workflows/dev-deploy.yaml @@ -1,4 +1,4 @@ -name: DEV Deploy +name: Dev Deploy on: push: @@ -83,7 +83,6 @@ jobs: script: | cd /home/ec2-user/Framey-Server - # git pull origin dev git pull --ff-only origin chore/FBE-7-nginx-routing export DEV_DB_URL="${{ secrets.DEV_DB_URL }}" From 1ec6a2e77d25118603370db259348e4e1812e123 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Mon, 19 Oct 2026 23:06:42 +0900 Subject: [PATCH 20/22] =?UTF-8?q?fix:=20=EA=B0=81=20=EC=84=9C=EB=B9=84?= =?UTF-8?q?=EC=8A=A4=20=EB=AA=A8=EB=93=88=20DockerFile=20=EC=88=98?= =?UTF-8?q?=EC=A0=95/Gradle=20=EC=BA=90=EC=8B=9C=20Lock=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- framey-application/archive-service/Dockerfile | 2 +- framey-application/collage-service/Dockerfile | 3 +-- framey-application/member-service/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/framey-application/archive-service/Dockerfile b/framey-application/archive-service/Dockerfile index 1b1aea6..615c8c7 100644 --- a/framey-application/archive-service/Dockerfile +++ b/framey-application/archive-service/Dockerfile @@ -2,7 +2,7 @@ FROM eclipse-temurin:21-jdk-alpine AS build WORKDIR /app COPY . . RUN chmod +x ./gradlew -RUN --mount=type=cache,target=/root/.gradle \ +RUN --mount=type=cache,target=/root/.gradle,sharing=locked \ ./gradlew :framey-application:archive-service:bootJar --no-daemon # Runtime Stage diff --git a/framey-application/collage-service/Dockerfile b/framey-application/collage-service/Dockerfile index 86aecc0..1a4915c 100644 --- a/framey-application/collage-service/Dockerfile +++ b/framey-application/collage-service/Dockerfile @@ -2,9 +2,8 @@ FROM eclipse-temurin:21-jdk-alpine AS build WORKDIR /app COPY . . RUN chmod +x ./gradlew -RUN --mount=type=cache,target=/root/.gradle \ +RUN --mount=type=cache,target=/root/.gradle,sharing=locked \ ./gradlew :framey-application:collage-service:bootJar --no-daemon - # Runtime Stage FROM eclipse-temurin:21-jre-alpine WORKDIR /app diff --git a/framey-application/member-service/Dockerfile b/framey-application/member-service/Dockerfile index c3d3d71..2956be4 100644 --- a/framey-application/member-service/Dockerfile +++ b/framey-application/member-service/Dockerfile @@ -2,7 +2,7 @@ FROM eclipse-temurin:21-jdk-alpine AS build WORKDIR /app COPY . . RUN chmod +x ./gradlew -RUN --mount=type=cache,target=/root/.gradle \ +RUN --mount=type=cache,target=/root/.gradle,sharing=locked \ ./gradlew :framey-application:member-service:bootJar --no-daemon # Runtime Stage FROM eclipse-temurin:21-jre-alpine From e9290485e4b29c4b4b0b8fbd3d50fcaeff12a423 Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Mon, 19 Oct 2026 23:25:07 +0900 Subject: [PATCH 21/22] =?UTF-8?q?fix:=20=EA=B0=81=20=EC=84=9C=EB=B9=84?= =?UTF-8?q?=EC=8A=A4=20=EB=AA=A8=EB=93=88=20=EB=82=B4=20application-dev=20?= =?UTF-8?q?postgre=20DB=20=EC=9E=AC=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-dev.yaml | 8 ++++++++ .../src/main/resources/application-dev.yaml | 8 ++++++++ .../src/main/resources/application-dev.yaml | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/framey-application/archive-service/src/main/resources/application-dev.yaml b/framey-application/archive-service/src/main/resources/application-dev.yaml index a1ea9cd..e6eaa41 100644 --- a/framey-application/archive-service/src/main/resources/application-dev.yaml +++ b/framey-application/archive-service/src/main/resources/application-dev.yaml @@ -3,10 +3,18 @@ spring: url: ${DEV_DB_URL} username: ${DEV_DB_USER} password: ${DEV_DB_PASSWORD} + driver-class-name: org.postgresql.Driver jpa: hibernate: ddl-auto: validate + open-in-view: false + show-sql: true + properties: + hibernate: + format_sql: true + highlight_sql: true + default_batch_fetch_size: 100 springdoc: api-docs: diff --git a/framey-application/collage-service/src/main/resources/application-dev.yaml b/framey-application/collage-service/src/main/resources/application-dev.yaml index a1ea9cd..e6eaa41 100644 --- a/framey-application/collage-service/src/main/resources/application-dev.yaml +++ b/framey-application/collage-service/src/main/resources/application-dev.yaml @@ -3,10 +3,18 @@ spring: url: ${DEV_DB_URL} username: ${DEV_DB_USER} password: ${DEV_DB_PASSWORD} + driver-class-name: org.postgresql.Driver jpa: hibernate: ddl-auto: validate + open-in-view: false + show-sql: true + properties: + hibernate: + format_sql: true + highlight_sql: true + default_batch_fetch_size: 100 springdoc: api-docs: diff --git a/framey-application/member-service/src/main/resources/application-dev.yaml b/framey-application/member-service/src/main/resources/application-dev.yaml index a1ea9cd..e6eaa41 100644 --- a/framey-application/member-service/src/main/resources/application-dev.yaml +++ b/framey-application/member-service/src/main/resources/application-dev.yaml @@ -3,10 +3,18 @@ spring: url: ${DEV_DB_URL} username: ${DEV_DB_USER} password: ${DEV_DB_PASSWORD} + driver-class-name: org.postgresql.Driver jpa: hibernate: ddl-auto: validate + open-in-view: false + show-sql: true + properties: + hibernate: + format_sql: true + highlight_sql: true + default_batch_fetch_size: 100 springdoc: api-docs: From 39bf79982574ea119a6972149f715eb1873cde0e Mon Sep 17 00:00:00 2001 From: Hwa Young Yang <110398814+young0311@users.noreply.github.com> Date: Tue, 20 Oct 2026 02:56:26 +0900 Subject: [PATCH 22/22] =?UTF-8?q?chore:=20dev=ED=99=98=EA=B2=BD=EC=9D=98?= =?UTF-8?q?=20=EB=B0=B0=ED=8F=AC=20=ED=8C=8C=EC=9D=B4=ED=94=84=EB=9D=BC?= =?UTF-8?q?=EC=9D=B8=20=EB=B8=8C=EB=A0=8C=EC=B9=98=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dev-deploy.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dev-deploy.yaml b/.github/workflows/dev-deploy.yaml index 8e572ef..d5c7f54 100644 --- a/.github/workflows/dev-deploy.yaml +++ b/.github/workflows/dev-deploy.yaml @@ -2,8 +2,7 @@ name: Dev Deploy on: push: - #dev 브렌치에 push 했을때 작동이지만 테스트로 임시 브렌치 변경 - branches: [chore/FBE-7-nginx-routing] + branches: [dev] jobs: detect-changes: @@ -83,7 +82,7 @@ jobs: script: | cd /home/ec2-user/Framey-Server - git pull --ff-only origin chore/FBE-7-nginx-routing + git pull origin dev export DEV_DB_URL="${{ secrets.DEV_DB_URL }}" export DEV_DB_USER="${{ secrets.DEV_DB_USER }}"