Skip to content

Commit cdea59e

Browse files
committed
Chore: mail 설정 및 management 위치 정리, local/stg/prod 프로필 구조 개선
1 parent b8a452e commit cdea59e

File tree

4 files changed

+39
-45
lines changed

4 files changed

+39
-45
lines changed

src/main/resources/application-local.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ spring:
55
username: ${MYSQL_USERNAME}
66
password: ${MYSQL_PASSWORD}
77

8+
mail:
9+
# smtp: smtp.gmail.com, port: 587 / mailpit: localhost, port: 1025
10+
# gmail 로컬에서 사용시 smtp-auth, starttls-enable, starttls-required: true
11+
host: ${MAIL_HOST:localhost}
12+
port: ${MAIL_PORT:1025}
13+
username: ${MAIL_USERNAME:[email protected]}
14+
password: ${MAIL_PASSWORD:}
15+
smtp-auth: ${SMTP_AUTH:false}
16+
starttls-enable: ${STARTTLS_ENABLE:false}
17+
starttls-required: ${STARTTLS_REQUIRED:false}
18+
819
jpa:
920
hibernate:
1021
ddl-auto: create-drop

src/main/resources/application-prod.yml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ spring:
55
username: ${MYSQL_USERNAME}
66
password: ${MYSQL_PASSWORD}
77

8+
mail:
9+
host: smtp.gmail.com
10+
port: 587
11+
username: ${MAIL_USERNAME}
12+
password: ${MAIL_PASSWORD}
13+
smtp-auth: true
14+
starttls-enable: true
15+
starttls-required: true
16+
17+
818
jpa:
919
hibernate:
1020
ddl-auto: ${DDL_AUTO:validate}
@@ -38,20 +48,3 @@ springdoc:
3848
servers:
3949
- url: ${SWAGGER_SERVER_URL}
4050
description: Production Server
41-
42-
management:
43-
server:
44-
port: 9091
45-
endpoints:
46-
web:
47-
exposure:
48-
include: health,info,prometheus
49-
50-
metrics:
51-
distribution:
52-
percentiles:
53-
all: 0.5, 0.9, 0.99
54-
percentiles-histogram:
55-
http.server.requests: true
56-
hikaricp.connections.acquire: true
57-
method.timed: true

src/main/resources/application-stg.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ spring:
1313
smtp-auth: false
1414
starttls-enable: false
1515
starttls-required: false
16-
connection-timeout: 5000
17-
timeout: 5000
18-
write-timeout: 5000
16+
1917

2018
jpa:
2119
hibernate:
@@ -50,20 +48,3 @@ springdoc:
5048
servers:
5149
- url: ${SWAGGER_SERVER_URL}
5250
description: Production Server
53-
54-
management:
55-
server:
56-
port: 9091
57-
endpoints:
58-
web:
59-
exposure:
60-
include: health,info,prometheus
61-
62-
metrics:
63-
distribution:
64-
percentiles:
65-
all: 0.5, 0.9, 0.99
66-
percentiles-histogram:
67-
http.server.requests: true
68-
hikaricp.connections.acquire: true
69-
method.timed: true

src/main/resources/application.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,28 @@ spring:
66
mongodb:
77
uri: ${MONGO_URI}
88

9-
109
mail:
11-
host: smtp.gmail.com
12-
port: 587
13-
username: ${MAIL_USERNAME}
14-
password: ${MAIL_PASSWORD}
15-
smtp-auth: true
16-
starttls-enable: true
17-
starttls-required: true
1810
connection-timeout: 5000
1911
timeout: 5000
2012
write-timeout: 5000
2113

14+
management:
15+
server:
16+
port: 9091
17+
endpoints:
18+
web:
19+
exposure:
20+
include: health,info,prometheus
21+
22+
metrics:
23+
distribution:
24+
percentiles:
25+
all: 0.5, 0.9, 0.99
26+
percentiles-histogram:
27+
http.server.requests: true
28+
hikaricp.connections.acquire: true
29+
method.timed: true
30+
2231
auth:
2332
signup-code-cache-name: signupCodeCache
2433
passcode-cache-name: passCodeCache

0 commit comments

Comments
 (0)