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:
|
application:
|
||||||
name: building
|
name: building
|
||||||
|
|
||||||
# PostgreSQL数据库配置
|
# PostgreSQL数据库配置 - 环境变量注入
|
||||||
datasource:
|
datasource:
|
||||||
driver-class-name: org.postgresql.Driver
|
driver-class-name: org.postgresql.Driver
|
||||||
url: jdbc:postgresql://localhost:5432/building_materials
|
url: jdbc:postgresql://${SPRING_DATASOURCE_HOST:localhost}:${SPRING_DATASOURCE_PORT:5432}/${SPRING_DATASOURCE_DB:building_materials}
|
||||||
username: postgres
|
username: ${SPRING_DATASOURCE_USERNAME:postgres}
|
||||||
password: postgres
|
password: ${SPRING_DATASOURCE_PASSWORD:postgres}
|
||||||
|
|
||||||
# Redis配置
|
# Redis配置 - 环境变量注入
|
||||||
redis:
|
redis:
|
||||||
host: localhost
|
host: ${SPRING_REDIS_HOST:localhost}
|
||||||
port: 6379
|
port: ${SPRING_REDIS_PORT:6379}
|
||||||
password:
|
password: ${SPRING_REDIS_PASSWORD:}
|
||||||
database: 0
|
database: 0
|
||||||
timeout: 3000ms
|
timeout: 3000ms
|
||||||
lettuce:
|
lettuce:
|
||||||
@@ -38,11 +38,11 @@ mybatis-plus:
|
|||||||
logic-delete-value: 0
|
logic-delete-value: 0
|
||||||
logic-not-delete-value: 1
|
logic-not-delete-value: 1
|
||||||
|
|
||||||
# JWT配置
|
# JWT配置 - 环境变量注入
|
||||||
jwt:
|
jwt:
|
||||||
secret: building-materials-secret-key-2024
|
secret: ${JWT_SECRET:building-materials-secret-key-2024}
|
||||||
expiration: 7200000 # 2小时
|
expiration: ${JWT_EXPIRATION:7200000}
|
||||||
refresh-expiration: 604800000 # 7天
|
refresh-expiration: ${JWT_REFRESH_EXPIRATION:604800000}
|
||||||
|
|
||||||
# 日志配置
|
# 日志配置
|
||||||
logging:
|
logging:
|
||||||
|
|||||||
Reference in New Issue
Block a user