mirror of
https://github.com/ktds-dg0501/kt-event-marketing.git
synced 2025-12-06 20:46:24 +00:00
- 백엔드 API 테스트 완료 (8/8 성공) - Redis, PostgreSQL, Kafka 연동 검증 - ErrorHandlingDeserializer를 통한 Kafka Consumer 안정화 - 테스트 결과 보고서 작성 (develop/dev/test-backend.md) - 실행 프로파일 추가 (event-service/.run/) - 설정 일치 검증 완료 (application.yml ↔ run.xml)
169 lines
4.2 KiB
YAML
169 lines
4.2 KiB
YAML
spring:
|
|
application:
|
|
name: event-service
|
|
|
|
# Database Configuration (PostgreSQL)
|
|
datasource:
|
|
url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:eventdb}
|
|
username: ${DB_USERNAME:eventuser}
|
|
password: ${DB_PASSWORD:eventpass}
|
|
driver-class-name: org.postgresql.Driver
|
|
hikari:
|
|
maximum-pool-size: 5
|
|
minimum-idle: 2
|
|
connection-timeout: 30000
|
|
idle-timeout: 600000
|
|
max-lifetime: 1800000
|
|
|
|
# JPA Configuration
|
|
jpa:
|
|
database-platform: org.hibernate.dialect.PostgreSQLDialect
|
|
hibernate:
|
|
ddl-auto: ${DDL_AUTO:update}
|
|
properties:
|
|
hibernate:
|
|
format_sql: false
|
|
show_sql: false
|
|
use_sql_comments: false
|
|
jdbc:
|
|
batch_size: 20
|
|
time_zone: Asia/Seoul
|
|
open-in-view: false
|
|
|
|
# Redis Configuration
|
|
data:
|
|
redis:
|
|
host: ${REDIS_HOST:localhost}
|
|
port: ${REDIS_PORT:6379}
|
|
password: ${REDIS_PASSWORD:}
|
|
timeout: 60000ms
|
|
connect-timeout: 60000ms
|
|
lettuce:
|
|
pool:
|
|
max-active: 5
|
|
max-idle: 3
|
|
min-idle: 1
|
|
max-wait: -1ms
|
|
shutdown-timeout: 200ms
|
|
|
|
# Kafka Configuration
|
|
kafka:
|
|
bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS:localhost:9092}
|
|
producer:
|
|
key-serializer: org.apache.kafka.common.serialization.StringSerializer
|
|
value-serializer: org.springframework.kafka.support.serializer.JsonSerializer
|
|
properties:
|
|
spring.json.add.type.headers: false
|
|
consumer:
|
|
group-id: event-service-consumers
|
|
key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
|
|
value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
|
|
properties:
|
|
spring.json.trusted.packages: "*"
|
|
spring.json.use.type.headers: false
|
|
auto-offset-reset: earliest
|
|
enable-auto-commit: false
|
|
listener:
|
|
ack-mode: manual
|
|
|
|
# Server Configuration
|
|
server:
|
|
port: ${SERVER_PORT:8080}
|
|
servlet:
|
|
context-path: /
|
|
shutdown: graceful
|
|
|
|
# Actuator Configuration
|
|
management:
|
|
endpoints:
|
|
web:
|
|
exposure:
|
|
include: health,info,metrics,prometheus
|
|
base-path: /actuator
|
|
endpoint:
|
|
health:
|
|
show-details: always
|
|
show-components: always
|
|
health:
|
|
redis:
|
|
enabled: false
|
|
livenessState:
|
|
enabled: true
|
|
readinessState:
|
|
enabled: true
|
|
|
|
# Logging Configuration
|
|
logging:
|
|
level:
|
|
root: INFO
|
|
com.kt.event: ${LOG_LEVEL:INFO}
|
|
org.springframework: WARN
|
|
org.springframework.data.redis: WARN
|
|
io.lettuce.core: WARN
|
|
org.hibernate.SQL: ${SQL_LOG_LEVEL:WARN}
|
|
org.hibernate.type.descriptor.sql.BasicBinder: WARN
|
|
pattern:
|
|
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
|
|
file: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
|
|
file:
|
|
name: ${LOG_FILE:logs/event-service.log}
|
|
logback:
|
|
rollingpolicy:
|
|
max-file-size: 10MB
|
|
max-history: 7
|
|
total-size-cap: 100MB
|
|
|
|
# Springdoc OpenAPI Configuration
|
|
springdoc:
|
|
api-docs:
|
|
path: /api-docs
|
|
swagger-ui:
|
|
path: /swagger-ui.html
|
|
operations-sorter: method
|
|
tags-sorter: alpha
|
|
show-actuator: false
|
|
|
|
# Feign Client Configuration
|
|
feign:
|
|
client:
|
|
config:
|
|
default:
|
|
connectTimeout: 5000
|
|
readTimeout: 10000
|
|
loggerLevel: basic
|
|
|
|
# Content Service Client
|
|
content-service:
|
|
url: ${CONTENT_SERVICE_URL:http://localhost:8082}
|
|
|
|
# Distribution Service Client
|
|
distribution-service:
|
|
url: ${DISTRIBUTION_SERVICE_URL:http://localhost:8084}
|
|
|
|
# Application Configuration
|
|
app:
|
|
kafka:
|
|
topics:
|
|
ai-event-generation-job: ai-event-generation-job
|
|
image-generation-job: image-generation-job
|
|
event-created: event-created
|
|
|
|
redis:
|
|
ttl:
|
|
ai-result: 86400 # 24시간 (초 단위)
|
|
image-result: 604800 # 7일 (초 단위)
|
|
key-prefix:
|
|
ai-recommendation: "ai:recommendation:"
|
|
image-generation: "image:generation:"
|
|
job-status: "job:status:"
|
|
|
|
job:
|
|
timeout:
|
|
ai-generation: 300000 # 5분 (밀리초 단위)
|
|
image-generation: 300000 # 5분 (밀리초 단위)
|
|
|
|
# JWT Configuration
|
|
jwt:
|
|
secret: ${JWT_SECRET:default-jwt-secret-key-for-development-minimum-32-bytes-required}
|
|
expiration: 86400000 # 24시간 (밀리초 단위)
|