Config via environment variables
Some checks failed
continuous-integration/drone/push Build encountered an error
Some checks failed
continuous-integration/drone/push Build encountered an error
This commit is contained in:
@@ -5,18 +5,18 @@ spring:
|
||||
application:
|
||||
name: building
|
||||
|
||||
# PostgreSQL数据库配置
|
||||
# PostgreSQL数据库配置 - 环境变量注入
|
||||
datasource:
|
||||
driver-class-name: org.postgresql.Driver
|
||||
url: jdbc:postgresql://localhost:5432/building_materials
|
||||
username: postgres
|
||||
password: postgres
|
||||
url: jdbc:postgresql://${SPRING_DATASOURCE_HOST:localhost}:${SPRING_DATASOURCE_PORT:5432}/${SPRING_DATASOURCE_DB:building_materials}
|
||||
username: ${SPRING_DATASOURCE_USERNAME:postgres}
|
||||
password: ${SPRING_DATASOURCE_PASSWORD:postgres}
|
||||
|
||||
# Redis配置
|
||||
# Redis配置 - 环境变量注入
|
||||
redis:
|
||||
host: localhost
|
||||
port: 6379
|
||||
password:
|
||||
host: ${SPRING_REDIS_HOST:localhost}
|
||||
port: ${SPRING_REDIS_PORT:6379}
|
||||
password: ${SPRING_REDIS_PASSWORD:}
|
||||
database: 0
|
||||
timeout: 3000ms
|
||||
lettuce:
|
||||
@@ -38,11 +38,11 @@ mybatis-plus:
|
||||
logic-delete-value: 0
|
||||
logic-not-delete-value: 1
|
||||
|
||||
# JWT配置
|
||||
# JWT配置 - 环境变量注入
|
||||
jwt:
|
||||
secret: building-materials-secret-key-2024
|
||||
expiration: 7200000 # 2小时
|
||||
refresh-expiration: 604800000 # 7天
|
||||
secret: ${JWT_SECRET:building-materials-secret-key-2024}
|
||||
expiration: ${JWT_EXPIRATION:7200000}
|
||||
refresh-expiration: ${JWT_REFRESH_EXPIRATION:604800000}
|
||||
|
||||
# 日志配置
|
||||
logging:
|
||||
|
||||
Reference in New Issue
Block a user