From 3c459382fd266005a403566107f5c728b2c8b8b2 Mon Sep 17 00:00:00 2001 From: DongJin Park Date: Tue, 10 Mar 2026 15:21:35 +0900 Subject: [PATCH 1/3] =?UTF-8?q?-=20swagger=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= =?UTF-8?q?=20=EA=B0=80=EB=8A=A5=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20-=20db=20ddlauto=20validate=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../global/common/swagger/SwaggerConfig.java | 9 +-------- src/main/resources/application-prod.yaml | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/babjo/deliverycommerce/global/common/swagger/SwaggerConfig.java b/src/main/java/com/babjo/deliverycommerce/global/common/swagger/SwaggerConfig.java index 9ab9620..e5d879a 100644 --- a/src/main/java/com/babjo/deliverycommerce/global/common/swagger/SwaggerConfig.java +++ b/src/main/java/com/babjo/deliverycommerce/global/common/swagger/SwaggerConfig.java @@ -6,12 +6,9 @@ import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.security.SecurityRequirement; import io.swagger.v3.oas.models.security.SecurityScheme; -import io.swagger.v3.oas.models.servers.Server; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import java.util.List; - @Configuration public class SwaggerConfig { @@ -23,11 +20,7 @@ public OpenAPI openAPI() { return new OpenAPI() // API 기본정보 .info(apiInfo()) - // 서버 URL 설정 - .servers(List.of( - new Server().url("http://localhost:8080").description("로컬 개발 서버") - //new Server().url("https://api.example.com").description("운영 서버") - )) + // 서버 URL을 지정하지 않으면 springdoc이 현재 접속 서버 URL을 자동 사용 // 전역 Security 설정 (API 자물쇠 아이콘 표시) .addSecurityItem(new SecurityRequirement().addList(securityScheme)) // Security 스키마 정의 diff --git a/src/main/resources/application-prod.yaml b/src/main/resources/application-prod.yaml index aa474e9..e8b4dd6 100644 --- a/src/main/resources/application-prod.yaml +++ b/src/main/resources/application-prod.yaml @@ -12,7 +12,7 @@ spring: jpa: hibernate: # 운영환경에서는 스키마를 자동 변경하지 않음 (validate: 엔티티-테이블 매핑만 검증) - ddl-auto: update + ddl-auto: validate properties: hibernate: format_sql: false # 운영에서는 SQL 포매팅 비활성화 (성능) From a4c8abba5c38a6f9b57b68300001b31a3ebaf84c Mon Sep 17 00:00:00 2001 From: DongJin Park Date: Tue, 10 Mar 2026 15:24:57 +0900 Subject: [PATCH 2/3] =?UTF-8?q?-=20prod=ED=99=98=EA=B2=BD=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=20=EC=84=A4=EC=A0=95=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/logback-spring.xml | 40 +++++++++++++++------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml index ed9220c..dfeb6e0 100644 --- a/src/main/resources/logback-spring.xml +++ b/src/main/resources/logback-spring.xml @@ -21,9 +21,9 @@ logs/app.log - + logs/app.%d{yyyy-MM-dd}.log - + 30 @@ -32,39 +32,43 @@ - - + + + + + + + + + - + - - - - - - - - - - - - + + - + + + + + \ No newline at end of file From 2e6a541f2b24f27dca38da7851d4aa2203baed1f Mon Sep 17 00:00:00 2001 From: DongJin Park Date: Tue, 10 Mar 2026 16:04:21 +0900 Subject: [PATCH 3/3] =?UTF-8?q?-=20ddl-auto=20update=EB=A1=9C=20=EC=88=98?= =?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-prod.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/application-prod.yaml b/src/main/resources/application-prod.yaml index e8b4dd6..aa474e9 100644 --- a/src/main/resources/application-prod.yaml +++ b/src/main/resources/application-prod.yaml @@ -12,7 +12,7 @@ spring: jpa: hibernate: # 운영환경에서는 스키마를 자동 변경하지 않음 (validate: 엔티티-테이블 매핑만 검증) - ddl-auto: validate + ddl-auto: update properties: hibernate: format_sql: false # 운영에서는 SQL 포매팅 비활성화 (성능)