Skip to content

Commit 0d30528

Browse files
authored
Merge pull request #321 from prgrms-web-devcourse-final-project/chore/EA3-213-setup
[EA3-213] chore: application-template.properties 구조 수정
2 parents 8997ee8 + 04bebd3 commit 0d30528

File tree

1 file changed

+42
-70
lines changed

1 file changed

+42
-70
lines changed

src/main/resources/application-template.properties

Lines changed: 42 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
spring.profiles.active=
1212

13+
# [common] =================================================================================
1314
# ---- Server ----
1415
server.port=80
1516
server.servlet.encoding.charset=UTF-8
@@ -21,8 +22,9 @@ front-server.domain=${FRONT_SERVER_DOMAIN:https://example-frontend.com}
2122
app.domain=${APP_DOMAIN:https://example-backend.com}
2223

2324
# ---- File Upload / Multipart ----
24-
spring.servlet.multipart.max-file-size=10MB
25-
spring.servlet.multipart.max-request-size=10MB
25+
upload.path=${UPLOAD_PATH}
26+
spring.servlet.multipart.max-file-size=30MB
27+
spring.servlet.multipart.max-request-size=30MB
2628

2729
# ---- Cache ----
2830
spring.cache.type=caffeine
@@ -52,13 +54,44 @@ spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
5254
spring.sql.init.schema-locations=classpath:schema.sql
5355
spring.sql.init.data-locations=classpath:data.sql
5456

55-
# ????????????????????????????????????????????????????????????????????????????????????????????
57+
# ---- Redis ----
58+
spring.data.redis.host=${REDIS_HOST}
59+
spring.data.redis.port=${REDIS_PORT}
60+
spring.data.redis.username=${REDIS_USERNAME}
61+
spring.data.redis.password=${REDIS_PASSWORD}
62+
spring.data.redis.ssl.enabled=true
63+
64+
# ---- JWT ----
65+
jwt.secret=${JWT_SECRET}
66+
jwt.expiration=${JWT_EXPIRATION:31536000000}
67+
jwt.refresh-expiration=${JWT_REFRESH_EXPIRATION:604800000}
68+
69+
# ---- Mail ----
70+
spring.mail.host=smtp.gmail.com
71+
spring.mail.port=587
72+
spring.mail.username=${SMTP_USERNAME}
73+
spring.mail.password=${SMTP_PASSWORD}
74+
spring.mail.properties.mail.smtp.auth=true
75+
spring.mail.properties.mail.smtp.starttls.enable=true
76+
77+
# ---- Google OAuth ----
78+
spring.security.oauth2.client.registration.google.client-id=${GOOGLE_CLIENT_ID}
79+
spring.security.oauth2.client.registration.google.client-secret=${GOOGLE_CLIENT_SECRET}
80+
spring.security.oauth2.client.registration.google.redirect-uri={baseUrl}/login/oauth2/code/{registrationId}
81+
spring.security.oauth2.client.registration.google.scope=profile,email
82+
spring.security.oauth2.client.registration.google.client-name=Google
83+
84+
# ---- LangChain/Gemini ----
85+
langchain4j.google-ai-gemini.chat-model.model-name=${GEMINI_MODEL_NAME:gemini-2.0-flash-lite}
86+
langchain4j.google-ai-gemini.chat-model.api-key=${GEMINI_API_KEY}
87+
langchain4j.google-ai-gemini.chat-model.log-requests-and-responses=true
88+
langchain4j.google-ai-gemini.chat-model.max-output-tokens=500
89+
5690
# Environment-specific settings
5791
# 1) GCP deployment (using Secret Manager)
5892
# - Enable spring.config.import=sm:// and reference secret keys via sm://
5993
# 2) AWS deployment (ENV/Secrets Manager)
6094
# - Reference with ${ENV_NAME} and inject as environment variables in ECS/EC2
61-
# ????????????????????????????????????????????????????????????????????????????????????????????
6295

6396
# [prod-gcp] example ========================================================================
6497
# Profile: prod-gcp
@@ -77,80 +110,19 @@ spring.sql.init.data-locations=classpath:data.sql
77110
#spring.datasource.driver-class-name=org.postgresql.Driver
78111
#spring.datasource.hikari.maximum-pool-size=5
79112

80-
# ---- Redis ----
81-
#spring.data.redis.host=${sm://redis-host}
82-
#spring.data.redis.port=${sm://redis-port}
83-
#spring.data.redis.username=${sm://redis-username}
84-
#spring.data.redis.password=${sm://redis-password}
85-
#spring.data.redis.ssl.enabled=true
86-
87-
# ---- JWT ----
88-
#jwt.expiration=${sm://jwt-expiration}
89-
#jwt.refresh-expiration=${sm://jwt-refresh-expiration}
90-
#jwt.secret=${sm://jwt-secret}
91-
92-
# ---- Mail ----
93-
#spring.mail.host=smtp.gmail.com
94-
#spring.mail.port=587
95-
#spring.mail.username=${sm://smtp-username}
96-
#spring.mail.password=${sm://smtp-password}
97-
#spring.mail.properties.mail.smtp.auth=true
98-
#spring.mail.properties.mail.smtp.starttls.enable=true
99-
100-
# ---- Google OAuth ----
101-
#spring.security.oauth2.client.registration.google.client-id=${sm://google-client-id}
102-
#spring.security.oauth2.client.registration.google.client-secret=${sm://google-secret}
103-
#spring.security.oauth2.client.registration.google.redirect-uri=${sm://google-redirect-uri}
104-
#spring.security.oauth2.client.registration.google.scope=profile,email
105-
#spring.security.oauth2.client.registration.google.client-name=Google
106-
107-
# ---- LangChain/Gemini ----
108-
#langchain4j.google-ai-gemini.chat-model.model-name=${sm://gemini-chat-model-name}
109-
#langchain4j.google-ai-gemini.chat-model.api-key=${sm://gemini-chat-model}
110-
#langchain4j.google-ai-gemini.chat-model.log-requests-and-responses=true
111-
#langchain4j.google-ai-gemini.chat-model.max-output-tokens=500
112-
113113
# [prod-aws] example ======================================================================
114114
# Profile: prod-aws
115115
# Run with: -Dspring.profiles.active=prod-aws
116116
# ==========================================================================================
117117

118+
# ---- S3 ----
119+
cloud.aws.s3.bucket=${AWS_S3_BUCKET}
120+
cloud.aws.region=${AWS_REGION:ap-northeast-2}
121+
cloud.aws.stack.auto=false
122+
118123
# ---- DB ----
119124
spring.datasource.url=${SPRING_DATASOURCE_URL}
120125
spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
121126
spring.datasource.password=${SPRING_DATASOURCE_PASSWORD}
122127
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
123128
spring.datasource.hikari.maximum-pool-size=5
124-
125-
# ---- Redis ----
126-
spring.data.redis.host=${REDIS_HOST}
127-
spring.data.redis.port=${REDIS_PORT}
128-
spring.data.redis.username=${REDIS_USERNAME:default}
129-
spring.data.redis.password=${REDIS_PASSWORD}
130-
spring.data.redis.ssl.enabled=true
131-
132-
# ---- JWT ----
133-
jwt.secret=${JWT_SECRET}
134-
jwt.expiration=${JWT_EXPIRATION:31536000000}
135-
jwt.refresh-expiration=${JWT_REFRESH_EXPIRATION:604800000}
136-
137-
# ---- Mail ----
138-
spring.mail.host=smtp.gmail.com
139-
spring.mail.port=587
140-
spring.mail.username=${SMTP_USERNAME}
141-
spring.mail.password=${SMTP_PASSWORD}
142-
spring.mail.properties.mail.smtp.auth=true
143-
spring.mail.properties.mail.smtp.starttls.enable=true
144-
145-
# ---- Google OAuth ----
146-
spring.security.oauth2.client.registration.google.client-id=${GOOGLE_CLIENT_ID}
147-
spring.security.oauth2.client.registration.google.client-secret=${GOOGLE_CLIENT_SECRET}
148-
spring.security.oauth2.client.registration.google.redirect-uri=${GOOGLE_REDIRECT_URI}
149-
spring.security.oauth2.client.registration.google.scope=profile,email
150-
spring.security.oauth2.client.registration.google.client-name=Google
151-
152-
# ---- LangChain/Gemini ----
153-
langchain4j.google-ai-gemini.chat-model.model-name=${GEMINI_MODEL_NAME:gemini-2.0-flash-lite}
154-
langchain4j.google-ai-gemini.chat-model.api-key=${GEMINI_API_KEY}
155-
langchain4j.google-ai-gemini.chat-model.log-requests-and-responses=true
156-
langchain4j.google-ai-gemini.chat-model.max-output-tokens=500

0 commit comments

Comments
 (0)