운영환경처리

This commit is contained in:
2026-03-10 16:00:23 +09:00
parent 7fce070686
commit 81b69caa99
4 changed files with 10 additions and 80 deletions

View File

@@ -4,19 +4,16 @@ spring:
on-profile: prod
jpa:
show-sql: true
show-sql: false # 운영 환경에서는 성능을 위해 비활성화
hibernate:
ddl-auto: validate
properties:
hibernate:
default_batch_fetch_size: 100 # ✅ 성능 - N+1 쿼리 방지
order_updates: true # ✅ 성능 - 업데이트 순서 정렬로 데드락 방지
use_sql_comments: true # ⚠️ 선택 - SQL에 주석 추가 (디버깅용)
format_sql: true # ⚠️ 선택 - SQL 포맷팅 (가독성)
default_batch_fetch_size: 100 # N+1 쿼리 방지
order_updates: true # 업데이트 순서 정렬로 데드락 방지
datasource:
url: jdbc:postgresql://kamco-cd-train-db:5432/kamco_training_db
# url: jdbc:postgresql://localhost:15432/kamco_training_db
username: kamco_training_user
password: kamco_training_user_2025_!@#
hikari:
@@ -31,13 +28,14 @@ spring:
default-timeout: 300 # 5분 트랜잭션 타임아웃
jwt:
secret: "kamco_token_dev_dfc6446d-68fc-4eba-a2ff-c80a14a0bf3a"
# ⚠️ 운영 환경에서는 반드시 별도의 강력한 시크릿 키를 사용하세요
secret: "kamco_token_prod_CHANGE_THIS_TO_SECURE_SECRET_KEY"
access-token-validity-in-ms: 86400000 # 1일
refresh-token-validity-in-ms: 604800000 # 7일
token:
refresh-cookie-name: kamco # 개발용 쿠키 이름
refresh-cookie-secure: false # 로컬 http 테스트면 false
refresh-cookie-name: kamco
refresh-cookie-secure: true # HTTPS 환경에서 필수
springdoc:
swagger-ui:
@@ -46,9 +44,6 @@ springdoc:
member:
init_password: kamco1234!
swagger:
local-port: 9080
file:
sync-root-dir: /app/original-images/
sync-tmp-dir: ${file.sync-root-dir}tmp/
@@ -70,8 +65,5 @@ train:
shmSize: 16g
ipcHost: true
# CORS 설정 (운영 환경)
cors:
allowed-origins:
- https://train-kamco.com