forked from MUSINSSAK/back-end
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplication.yml
More file actions
135 lines (120 loc) · 3.72 KB
/
application.yml
File metadata and controls
135 lines (120 loc) · 3.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
server:
port: 8080
tomcat:
mbeanregistry:
enabled: true # ← Tomcat 스레드/세션 지표가 생성되도록 MBean 등록
spring:
flyway: # Flyway 활성화
enabled: true
locations: classpath:db/migration
baseline-on-migrate: true
config:
import: optional:file:.env[.properties] # .env 파일 읽기
application:
name: musinsa-shop
# Database Configuration
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3300/musinsa_shop?useSSL=false&useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Seoul&allowPublicKeyRetrieval=true
# 공개키 요청을 허용 : allowPublicKeyRetrieval=true
# url: jdbc:mysql://localhost:3300/musinsa_shop?useSSL=false&useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Seoul
username: ${DB_USERNAME} # MUSINSSAK / root
password: ${DB_PASSWORD}
# JPA Configuration
jpa:
hibernate:
ddl-auto: validate
show-sql: true
properties:
hibernate:
format_sql: true # SQL 예쁘게 출력
dialect: org.hibernate.dialect.MySQLDialect
# Redis Configuration
data:
redis:
host: localhost
port: 6379
# host: redis # 앱도 도커에서 뜬다면 이걸로 (compose 서비스명)
# Kafka Configuration
kafka:
bootstrap-servers: localhost:9092
consumer:
group-id: musinsa-shop-group
auto-offset-reset: earliest
producer:
key-serializer: org.apache.kafka.common.serialization.StringSerializer
value-serializer: org.apache.kafka.common.serialization.StringSerializer
# Email(JavaMailSender) Configuration
mail:
host: smtp.gmail.com
port: 587
username: ${MAIL_USERNAME}
password: ${MAIL_PASSWORD}
properties:
mail:
smtp:
auth: true
starttls:
enable: true
# Swagger Configuration -> 배포 전(application.yml 하나로 유지)
springdoc:
api-docs:
enabled: true
path: /v3/api-docs
swagger-ui:
enabled: true
path: /swagger-ui.html
doc-expansion: none
display-request-duration: true
operations-sorter: alpha
tags-sorter: alpha
# Logging Configuration
logging:
level:
root: INFO
com.example.musinsashop: DEBUG
# JWT Configuration
jwt:
secret: ${JWT_SECRET}
access-expire-ms: ${JWT_ACCESS_EXPIRE_MS}
refresh-expire-ms: ${JWT_REFRESH_EXPIRE_MS}
# 주소검색 API 설정
kakao:
local:
base-url: https://dapi.kakao.com
rest-api-key: ${KAKAO_REST_API_KEY}
# 개발 모니터링 (운영: 서비스는 8080 유지, Actuator만 8081로 분리)
management:
endpoints:
web:
exposure:
include: [health, info, prometheus] # 리스트 형태 권장
endpoint:
health:
show-details: "always"
metrics:
enable:
tomcat: true # ← 톰캣 메트릭 바인더 활성화(보통 기본 true지만 명시 권장)
tags:
application: ${spring.application.name}
distribution:
percentiles-histogram:
http:
server:
requests: true # 히스토그램 ON (HTTP 서버)
slo:
http:
server:
# 소수초(0.1s, 0.3s ...) 대신 정수 Duration 사용
requests: [ 100ms, 300ms, 500ms, 1s, 3s ]
prometheus:
metrics:
export:
enabled: true
base-url: https://dapi.kakao.com # 카카오 주소검색 API 기본 URL
rest-api-key: ${KAKAO_REST_API_KEY} # .env에서 REST API 키를 불러옴
# 포트원 V2 API 설정
portone:
api-secret: ${PORTONE_API_SECRET} # .env에서 포트원 API Secret을 불러옴
store-id: ${PORTONE_STORE_ID} # .env에서 포트원 Store ID를 불러옴
channel-key: ${PORTONE_CHANNEL_KEY} # .env에서 포트원 채널 키를 불러옴