mirror of
https://github.com/cna-bootcamp/phonebill.git
synced 2025-12-06 08:06:24 +00:00
- Redis timeout 값을 문자열('2000ms')에서 숫자(2000)로 변경
- lettuce pool max-wait 값도 동일하게 수정
- 영향 서비스: bill-service, product-service, user-service
- TypeMismatchException 해결로 런타임 오류 수정
121 lines
2.6 KiB
YAML
121 lines
2.6 KiB
YAML
server:
|
|
port: ${SERVER_PORT:8081}
|
|
# HTTP 헤더 크기 제한 설정
|
|
max-http-header-size: 64KB
|
|
max-http-request-header-size: 64KB
|
|
|
|
spring:
|
|
application:
|
|
name: user-service
|
|
|
|
profiles:
|
|
active: ${SPRING_PROFILES_ACTIVE:dev}
|
|
|
|
datasource:
|
|
url: jdbc:${DB_KIND:postgresql}://${DB_HOST:localhost}:${DB_PORT:5432}/${DB_NAME:phonebill_auth}
|
|
username: ${DB_USERNAME:phonebill_user}
|
|
password: ${DB_PASSWORD:phonebill_pass}
|
|
driver-class-name: org.postgresql.Driver
|
|
hikari:
|
|
maximum-pool-size: 20
|
|
minimum-idle: 5
|
|
connection-timeout: 30000
|
|
idle-timeout: 600000
|
|
max-lifetime: 1800000
|
|
leak-detection-threshold: 60000
|
|
# JPA 설정
|
|
jpa:
|
|
show-sql: ${SHOW_SQL:true}
|
|
properties:
|
|
hibernate:
|
|
format_sql: true
|
|
use_sql_comments: true
|
|
hibernate:
|
|
ddl-auto: ${DDL_AUTO:update}
|
|
|
|
# Redis 설정
|
|
data:
|
|
redis:
|
|
host: ${REDIS_HOST:localhost}
|
|
port: ${REDIS_PORT:6379}
|
|
password: ${REDIS_PASSWORD:}
|
|
timeout: 2000
|
|
lettuce:
|
|
pool:
|
|
max-active: 8
|
|
max-idle: 8
|
|
min-idle: 0
|
|
max-wait: -1
|
|
database: ${REDIS_DATABASE:0}
|
|
|
|
# Jackson 설정
|
|
jackson:
|
|
property-naming-strategy: SNAKE_CASE
|
|
default-property-inclusion: NON_NULL
|
|
time-zone: Asia/Seoul
|
|
|
|
# Redis 캐시 설정
|
|
cache:
|
|
type: redis
|
|
redis:
|
|
time-to-live: 1800000 # 30분
|
|
cache-null-values: false
|
|
|
|
# CORS
|
|
cors:
|
|
allowed-origins: ${CORS_ALLOWED_ORIGINS:http://localhost:3000}
|
|
|
|
# JWT 토큰 설정
|
|
jwt:
|
|
secret: ${JWT_SECRET:}
|
|
access-token-validity: ${JWT_ACCESS_TOKEN_VALIDITY:1800000}
|
|
refresh-token-validity: ${JWT_REFRESH_TOKEN_VALIDITY:86400000}
|
|
|
|
# 로깅 설정
|
|
logging:
|
|
file:
|
|
name: logs/user-service.log
|
|
|
|
# 액추에이터 설정
|
|
management:
|
|
endpoints:
|
|
web:
|
|
exposure:
|
|
include: health,info,metrics,prometheus
|
|
base-path: /actuator
|
|
endpoint:
|
|
health:
|
|
show-details: when_authorized
|
|
info:
|
|
env:
|
|
enabled: true
|
|
java:
|
|
enabled: true
|
|
metrics:
|
|
export:
|
|
prometheus:
|
|
enabled: true
|
|
|
|
# OpenAPI/Swagger 설정
|
|
springdoc:
|
|
api-docs:
|
|
path: /v3/api-docs
|
|
swagger-ui:
|
|
path: /swagger-ui.html
|
|
display-request-duration: true
|
|
groups-order: DESC
|
|
operationsSorter: method
|
|
disable-swagger-default-url: true
|
|
use-root-path: true
|
|
|
|
# Auth Service 특화 설정
|
|
auth:
|
|
login:
|
|
max-failed-attempts: 5
|
|
lockout-duration: 1800000 # 30분 (milliseconds)
|
|
session:
|
|
default-timeout: 1800000 # 30분 (milliseconds)
|
|
auto-login-timeout: 86400000 # 24시간 (milliseconds)
|
|
password:
|
|
bcrypt-strength: 12
|