|
| 1 | +# ========================================================================================== |
| 2 | +# Application Template (DO NOT PUT SECRETS) |
| 3 | +# Inject actual values via environment variables / secret manager. |
| 4 | +# - GCP: use ${sm://secret-name} |
| 5 | +# - AWS: use ${ENV_NAME} environment variables / Secrets Manager |
| 6 | +# ========================================================================================== |
| 7 | + |
| 8 | +# ---- Profile ---- |
| 9 | +# Specify -Dspring.profiles.active=prod-gcp or prod-aws when running/deploying |
| 10 | + |
| 11 | +spring.profiles.active= |
| 12 | + |
| 13 | +# ---- Server ---- |
| 14 | +server.port=80 |
| 15 | +server.servlet.encoding.charset=UTF-8 |
| 16 | +server.servlet.encoding.enabled=true |
| 17 | +server.servlet.encoding.force=true |
| 18 | + |
| 19 | +# ---- Domain / CORS (replace per environment) ---- |
| 20 | +front-server.domain=${FRONT_SERVER_DOMAIN:https://example-frontend.com} |
| 21 | +app.domain=${APP_DOMAIN:https://example-backend.com} |
| 22 | + |
| 23 | +# ---- File Upload / Multipart ---- |
| 24 | +spring.servlet.multipart.max-file-size=10MB |
| 25 | +spring.servlet.multipart.max-request-size=10MB |
| 26 | + |
| 27 | +# ---- Cache ---- |
| 28 | +spring.cache.type=caffeine |
| 29 | +spring.cache.cache-names=authority |
| 30 | +spring.cache.caffeine.spec=expireAfterWrite=10s |
| 31 | + |
| 32 | +# ---- Logging ---- |
| 33 | +logging.level.root=info |
| 34 | +logging.level.org.hibernate.SQL=info |
| 35 | +logging.level.org.hibernate.type.descriptor.sql.BasicBinder=info |
| 36 | +logging.level.org.hibernate.type.descriptor.sql=info |
| 37 | +logging.level.org.springframework.cloud.openfeign=info |
| 38 | +logging.level.org.springframework.security=info |
| 39 | +logging.level.org.springframework.web.client.RestTemplate=info |
| 40 | +logging.level.org.springframework.security.oauth2.client.authentication.OAuth2LoginAuthenticationProvider=info |
| 41 | +logging.level.org.springframework.security.oauth2.core.http.converter=info |
| 42 | +spring.cloud.openfeign.client.config.default.logger-level=full |
| 43 | + |
| 44 | +# ---- JPA ---- |
| 45 | +spring.jpa.open-in-view=false |
| 46 | +spring.sql.init.mode=never |
| 47 | +spring.jpa.hibernate.ddl-auto=update |
| 48 | +spring.jpa.properties.hibernate.format_sql=true |
| 49 | +spring.jpa.defer-datasource-initialization=true |
| 50 | +spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false |
| 51 | +spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true |
| 52 | +spring.sql.init.schema-locations=classpath:schema.sql |
| 53 | +spring.sql.init.data-locations=classpath:data.sql |
| 54 | + |
| 55 | +# ???????????????????????????????????????????????????????????????????????????????????????????? |
| 56 | +# Environment-specific settings |
| 57 | +# 1) GCP deployment (using Secret Manager) |
| 58 | +# - Enable spring.config.import=sm:// and reference secret keys via sm:// |
| 59 | +# 2) AWS deployment (ENV/Secrets Manager) |
| 60 | +# - Reference with ${ENV_NAME} and inject as environment variables in ECS/EC2 |
| 61 | +# ???????????????????????????????????????????????????????????????????????????????????????????? |
| 62 | + |
| 63 | +# [prod-gcp] example ======================================================================== |
| 64 | +# Profile: prod-gcp |
| 65 | +# Run with: -Dspring.profiles.active=prod-gcp |
| 66 | +# ============================================================================================= |
| 67 | +# spring.config.import=sm:// # Enable GCP Secret Manager import |
| 68 | + |
| 69 | +# spring.cloud.gcp.secretmanager.enabled=true |
| 70 | +# google.cloud.storage.bucket=YOUR_GCS_BUCKET |
| 71 | +# google.cloud.storage.project-id=YOUR_GCP_PROJECT |
| 72 | + |
| 73 | +# ---- DB ---- |
| 74 | +#spring.datasource.url=${sm://db-url} |
| 75 | +#spring.datasource.username=${sm://db-username} |
| 76 | +#spring.datasource.password=${sm://db-password} |
| 77 | +#spring.datasource.driver-class-name=org.postgresql.Driver |
| 78 | +#spring.datasource.hikari.maximum-pool-size=5 |
| 79 | + |
| 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 | + |
| 113 | +# [prod-aws] example ====================================================================== |
| 114 | +# Profile: prod-aws |
| 115 | +# Run with: -Dspring.profiles.active=prod-aws |
| 116 | +# ========================================================================================== |
| 117 | + |
| 118 | +# ---- DB ---- |
| 119 | +spring.datasource.url=${SPRING_DATASOURCE_URL} |
| 120 | +spring.datasource.username=${SPRING_DATASOURCE_USERNAME} |
| 121 | +spring.datasource.password=${SPRING_DATASOURCE_PASSWORD} |
| 122 | +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver |
| 123 | +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