mirror of
https://github.com/ktds-dg0501/kt-event-marketing.git
synced 2025-12-06 10:46:23 +00:00
application.yml 통합 및 Azure Blob Storage 설정 추가
- application-dev.yml, application-local.yml 삭제 - 단일 application.yml로 통합 (user-service 형식 참고) - Azure Blob Storage connection string 기본값 추가 - Redis, Actuator, Logging 상세 설정 추가 - OpenAPI/Swagger 설정 추가 - CORS 설정 추가 - 모든 설정을 환경 변수로 관리 가능하도록 구성 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
5a82fe3610
commit
9305dfdb7f
@ -2,9 +2,13 @@ configurations {
|
||||
// Exclude JPA and PostgreSQL from inherited dependencies (Phase 3: Redis migration)
|
||||
implementation.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-data-jpa'
|
||||
implementation.exclude group: 'org.postgresql', module: 'postgresql'
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'org.springframework.boot:spring-boot-starter-actuator'
|
||||
|
||||
// Redis for AI data reading and image URL caching
|
||||
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
|
||||
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
spring:
|
||||
application:
|
||||
name: content-service
|
||||
|
||||
data:
|
||||
redis:
|
||||
host: ${REDIS_HOST:20.214.210.71}
|
||||
port: ${REDIS_PORT:6379}
|
||||
password: ${REDIS_PASSWORD:}
|
||||
|
||||
server:
|
||||
port: ${SERVER_PORT:8084}
|
||||
|
||||
jwt:
|
||||
secret: ${JWT_SECRET:kt-event-marketing-jwt-secret-key-for-authentication-and-authorization-2025}
|
||||
access-token-validity: ${JWT_ACCESS_TOKEN_VALIDITY:3600000}
|
||||
refresh-token-validity: ${JWT_REFRESH_TOKEN_VALIDITY:604800000}
|
||||
|
||||
azure:
|
||||
storage:
|
||||
connection-string: ${AZURE_STORAGE_CONNECTION_STRING:}
|
||||
container-name: ${AZURE_CONTAINER_NAME:event-images}
|
||||
|
||||
replicate:
|
||||
api:
|
||||
url: ${REPLICATE_API_URL:https://api.replicate.com}
|
||||
token: ${REPLICATE_API_TOKEN:r8_Q33U00fSnpjYlHNIRglwurV446h7g8V2wkFFa}
|
||||
|
||||
huggingface:
|
||||
api:
|
||||
url: ${HUGGINGFACE_API_URL:https://api-inference.huggingface.co}
|
||||
token: ${HUGGINGFACE_API_TOKEN:}
|
||||
model: ${HUGGINGFACE_MODEL:runwayml/stable-diffusion-v1-5}
|
||||
|
||||
logging:
|
||||
level:
|
||||
com.kt.event: ${LOG_LEVEL_APP:DEBUG}
|
||||
root: ${LOG_LEVEL_ROOT:INFO}
|
||||
file:
|
||||
name: ${LOG_FILE:logs/content-service.log}
|
||||
logback:
|
||||
rollingpolicy:
|
||||
max-file-size: 10MB
|
||||
max-history: 7
|
||||
total-size-cap: 100MB
|
||||
@ -1,43 +0,0 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:h2:mem:contentdb
|
||||
username: sa
|
||||
password:
|
||||
driver-class-name: org.h2.Driver
|
||||
|
||||
h2:
|
||||
console:
|
||||
enabled: true
|
||||
path: /h2-console
|
||||
|
||||
jpa:
|
||||
database-platform: org.hibernate.dialect.H2Dialect
|
||||
hibernate:
|
||||
ddl-auto: create-drop
|
||||
show-sql: true
|
||||
properties:
|
||||
hibernate:
|
||||
format_sql: true
|
||||
dialect: org.hibernate.dialect.H2Dialect
|
||||
|
||||
data:
|
||||
redis:
|
||||
# Redis 연결 비활성화 (Mock 사용)
|
||||
repositories:
|
||||
enabled: false
|
||||
host: localhost
|
||||
port: 6379
|
||||
|
||||
autoconfigure:
|
||||
exclude:
|
||||
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
|
||||
- org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration
|
||||
|
||||
server:
|
||||
port: 8084
|
||||
|
||||
logging:
|
||||
level:
|
||||
com.kt.event: DEBUG
|
||||
org.hibernate.SQL: DEBUG
|
||||
org.hibernate.type.descriptor.sql.BasicBinder: TRACE
|
||||
@ -2,38 +2,97 @@ spring:
|
||||
application:
|
||||
name: content-service
|
||||
|
||||
# Redis Configuration
|
||||
data:
|
||||
redis:
|
||||
enabled: ${REDIS_ENABLED:true}
|
||||
host: ${REDIS_HOST:20.214.210.71}
|
||||
port: ${REDIS_PORT:6379}
|
||||
password: ${REDIS_PASSWORD:Hi5Jessica!}
|
||||
timeout: ${REDIS_TIMEOUT:2000ms}
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: ${REDIS_POOL_MAX:8}
|
||||
max-idle: ${REDIS_POOL_IDLE:8}
|
||||
min-idle: ${REDIS_POOL_MIN:0}
|
||||
max-wait: ${REDIS_POOL_WAIT:-1ms}
|
||||
database: ${REDIS_DATABASE:0}
|
||||
|
||||
server:
|
||||
port: ${SERVER_PORT:8084}
|
||||
|
||||
# JWT Configuration
|
||||
jwt:
|
||||
secret: ${JWT_SECRET:dev-jwt-secret-key-minimum-32-characters-required-for-hmac-sha256}
|
||||
secret: ${JWT_SECRET:kt-event-marketing-jwt-secret-key-for-authentication-and-authorization-2025}
|
||||
access-token-validity: ${JWT_ACCESS_TOKEN_VALIDITY:3600000}
|
||||
refresh-token-validity: ${JWT_REFRESH_TOKEN_VALIDITY:604800000}
|
||||
|
||||
# Azure Blob Storage Configuration
|
||||
azure:
|
||||
storage:
|
||||
connection-string: ${AZURE_STORAGE_CONNECTION_STRING:}
|
||||
container-name: ${AZURE_CONTAINER_NAME:event-images}
|
||||
connection-string: ${AZURE_STORAGE_CONNECTION_STRING:DefaultEndpointsProtocol=https;AccountName=blobkteventstorage;AccountKey=tcBN7mAfojbl0uGsOpU7RNuKNhHnzmwDiWjN31liSMVSrWaEK+HHnYKZrjBXXAC6ZPsuxUDlsf8x+AStd++QYg==;EndpointSuffix=core.windows.net}
|
||||
container-name: ${AZURE_CONTAINER_NAME:content-images}
|
||||
|
||||
# Replicate API Configuration (Stable Diffusion)
|
||||
replicate:
|
||||
api:
|
||||
url: ${REPLICATE_API_URL:https://api.replicate.com}
|
||||
token: ${REPLICATE_API_TOKEN:}
|
||||
model:
|
||||
version: ${REPLICATE_MODEL_VERSION:stability-ai/sdxl:39ed52f2a78e934b3ba6e2a89f5b1c712de7dfea535525255b1aa35c5565e08b}
|
||||
|
||||
# HuggingFace API Configuration
|
||||
huggingface:
|
||||
api:
|
||||
url: ${HUGGINGFACE_API_URL:https://api-inference.huggingface.co}
|
||||
token: ${HUGGINGFACE_API_TOKEN:}
|
||||
model: ${HUGGINGFACE_MODEL:runwayml/stable-diffusion-v1-5}
|
||||
|
||||
# CORS Configuration
|
||||
cors:
|
||||
allowed-origins: ${CORS_ALLOWED_ORIGINS:http://localhost:*}
|
||||
|
||||
# Actuator
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: health,info,metrics,prometheus
|
||||
base-path: /actuator
|
||||
endpoint:
|
||||
health:
|
||||
show-details: always
|
||||
show-components: always
|
||||
health:
|
||||
livenessState:
|
||||
enabled: true
|
||||
readinessState:
|
||||
enabled: true
|
||||
|
||||
# OpenAPI Documentation
|
||||
springdoc:
|
||||
api-docs:
|
||||
path: /v3/api-docs
|
||||
swagger-ui:
|
||||
path: /swagger-ui.html
|
||||
tags-sorter: alpha
|
||||
operations-sorter: alpha
|
||||
show-actuator: false
|
||||
|
||||
# Logging
|
||||
logging:
|
||||
level:
|
||||
com.kt.event: ${LOG_LEVEL_APP:DEBUG}
|
||||
com.kt.event.content: ${LOG_LEVEL_APP:DEBUG}
|
||||
org.springframework.web: ${LOG_LEVEL_WEB:INFO}
|
||||
root: ${LOG_LEVEL_ROOT:INFO}
|
||||
pattern:
|
||||
console: "%d{yyyy-MM-dd HH:mm:ss} - %msg%n"
|
||||
file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
|
||||
file:
|
||||
name: ${LOG_FILE:logs/content-service.log}
|
||||
name: ${LOG_FILE_PATH:logs/content-service.log}
|
||||
logback:
|
||||
rollingpolicy:
|
||||
max-file-size: 10MB
|
||||
max-history: 7
|
||||
total-size-cap: 100MB
|
||||
max-file-size: ${LOG_FILE_MAX_SIZE:10MB}
|
||||
max-history: ${LOG_FILE_MAX_HISTORY:7}
|
||||
total-size-cap: ${LOG_FILE_TOTAL_CAP:100MB}
|
||||
|
||||
# Server Configuration
|
||||
server:
|
||||
port: ${SERVER_PORT:8084}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user