- Redis, Kafka, Server, JWT, CORS 설정을 static 값으로 변경 - AI API Configuration을 실제 API 키와 함께 static하게 설정 - 모든 환경 변수 플레이스홀더를 제거하고 직접 값 지정 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
169 lines
4.1 KiB
YAML
169 lines
4.1 KiB
YAML
spring:
|
|
application:
|
|
name: ai-service
|
|
|
|
# Redis Configuration
|
|
data:
|
|
redis:
|
|
host: 20.214.210.71
|
|
port: 6379
|
|
password: Hi5Jessica!
|
|
database: 3
|
|
timeout: 3000
|
|
lettuce:
|
|
pool:
|
|
max-active: 8
|
|
max-idle: 8
|
|
min-idle: 2
|
|
max-wait: -1ms
|
|
|
|
# Kafka Consumer Configuration
|
|
kafka:
|
|
bootstrap-servers: 4.230.50.63:9092
|
|
consumer:
|
|
group-id: ai-service-consumers
|
|
auto-offset-reset: earliest
|
|
enable-auto-commit: false
|
|
key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
|
|
value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
|
|
properties:
|
|
spring.json.trusted.packages: "*"
|
|
max.poll.records: 10
|
|
session.timeout.ms: 30000
|
|
listener:
|
|
ack-mode: manual
|
|
|
|
# Server Configuration
|
|
server:
|
|
port: 8083
|
|
servlet:
|
|
context-path: /
|
|
encoding:
|
|
charset: UTF-8
|
|
enabled: true
|
|
force: true
|
|
|
|
# JWT Configuration
|
|
jwt:
|
|
secret: kt-event-marketing-secret-key-for-development-only-please-change-in-production
|
|
access-token-validity: 604800000
|
|
refresh-token-validity: 86400
|
|
|
|
# CORS Configuration
|
|
cors:
|
|
allowed-origins: http://localhost:*
|
|
allowed-methods: GET,POST,PUT,DELETE,OPTIONS,PATCH
|
|
allowed-headers: "*"
|
|
allow-credentials: true
|
|
max-age: 3600
|
|
|
|
# Actuator Configuration
|
|
management:
|
|
endpoints:
|
|
web:
|
|
exposure:
|
|
include: health,info,metrics,prometheus
|
|
endpoint:
|
|
health:
|
|
show-details: always
|
|
health:
|
|
redis:
|
|
enabled: true
|
|
kafka:
|
|
enabled: true
|
|
|
|
# OpenAPI Documentation Configuration
|
|
springdoc:
|
|
api-docs:
|
|
path: /v3/api-docs
|
|
enabled: true
|
|
swagger-ui:
|
|
path: /swagger-ui.html
|
|
enabled: true
|
|
operations-sorter: method
|
|
tags-sorter: alpha
|
|
display-request-duration: true
|
|
doc-expansion: none
|
|
show-actuator: false
|
|
default-consumes-media-type: application/json
|
|
default-produces-media-type: application/json
|
|
|
|
# Logging Configuration
|
|
logging:
|
|
level:
|
|
root: INFO
|
|
com.kt.ai: DEBUG
|
|
org.springframework.kafka: INFO
|
|
org.springframework.data.redis: INFO
|
|
io.github.resilience4j: DEBUG
|
|
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: logs/ai-service.log
|
|
logback:
|
|
rollingpolicy:
|
|
max-file-size: 10MB
|
|
max-history: 7
|
|
total-size-cap: 100MB
|
|
|
|
# Kafka Topics Configuration
|
|
kafka:
|
|
topics:
|
|
ai-job: ai-event-generation-job
|
|
ai-job-dlq: ai-event-generation-job-dlq
|
|
|
|
# AI API Configuration (실제 API 사용)
|
|
ai:
|
|
provider: CLAUDE
|
|
claude:
|
|
api-url: https://api.anthropic.com/v1/messages
|
|
api-key: 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
|
|
anthropic-version: 2023-06-01
|
|
model: claude-sonnet-4-5-20250929
|
|
max-tokens: 4096
|
|
temperature: 0.7
|
|
timeout: 300000
|
|
|
|
# Circuit Breaker Configuration
|
|
resilience4j:
|
|
circuitbreaker:
|
|
configs:
|
|
default:
|
|
failure-rate-threshold: 50
|
|
slow-call-rate-threshold: 50
|
|
slow-call-duration-threshold: 60s
|
|
permitted-number-of-calls-in-half-open-state: 3
|
|
max-wait-duration-in-half-open-state: 0
|
|
sliding-window-type: COUNT_BASED
|
|
sliding-window-size: 10
|
|
minimum-number-of-calls: 5
|
|
wait-duration-in-open-state: 60s
|
|
automatic-transition-from-open-to-half-open-enabled: true
|
|
instances:
|
|
claudeApi:
|
|
base-config: default
|
|
failure-rate-threshold: 50
|
|
wait-duration-in-open-state: 60s
|
|
gpt4Api:
|
|
base-config: default
|
|
failure-rate-threshold: 50
|
|
wait-duration-in-open-state: 60s
|
|
timelimiter:
|
|
configs:
|
|
default:
|
|
timeout-duration: 300s # 5 minutes
|
|
instances:
|
|
claudeApi:
|
|
timeout-duration: 300s
|
|
gpt4Api:
|
|
timeout-duration: 300s
|
|
|
|
# Redis Cache TTL Configuration (seconds)
|
|
cache:
|
|
ttl:
|
|
recommendation: 86400 # 24 hours
|
|
job-status: 86400 # 24 hours
|
|
trend: 3600 # 1 hour
|
|
fallback: 604800 # 7 days
|