chore: 统一环境配置,支持 .env 快速切换本地/远程基础设施

This commit is contained in:
2026-07-13 14:17:49 +08:00
parent 8c4deb5be4
commit 0bf48fd449
8 changed files with 273 additions and 57 deletions

View File

@@ -1,19 +1,19 @@
spring:
datasource:
url: jdbc:mysql://localhost:3306/sino_mci?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true
username: root
password: root
url: jdbc:mysql://${MYSQL_HOST:localhost}:${MYSQL_PORT:3306}/${MYSQL_DATABASE:sino_mci}?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true
username: ${MYSQL_USER:root}
password: ${MYSQL_ROOT_PASSWORD:root}
driver-class-name: com.mysql.cj.jdbc.Driver
data:
redis:
host: localhost
port: 6379
host: ${REDIS_HOST:localhost}
port: ${REDIS_PORT:6379}
database: 0
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest
host: ${RABBITMQ_HOST:localhost}
port: ${RABBITMQ_AMQP_PORT:5672}
username: ${RABBITMQ_DEFAULT_USER:guest}
password: ${RABBITMQ_DEFAULT_PASS:guest}
ai:
openai:
api-key: ${OPENAI_API_KEY:}