Files
urbanLifeline/urbanLifelineServ/file/src/main/resources/bootstrap.yml
2026-01-20 16:17:39 +08:00

65 lines
1.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ================================================
# Urban Lifeline - 通用 Bootstrap 配置
# 所有微服务共享的基础配置
# ================================================
# ================== Spring Cloud Nacos ==================
spring:
cloud:
nacos:
discovery:
server-addr: ${NACOS_SERVER_ADDR:127.0.0.1:8848}
namespace: ${NACOS_NAMESPACE:dev}
group: ${NACOS_GROUP:DEFAULT_GROUP}
# ================== DataSource ==================
datasource:
url: ${DB_URL:jdbc:postgresql://127.0.0.1:5432/urban_lifeline}
username: ${DB_USERNAME:postgres}
password: ${DB_PASSWORD:postgres}
driver-class-name: org.postgresql.Driver
# ================== Redis ==================
data:
redis:
host: ${REDIS_HOST:127.0.0.1}
port: ${REDIS_PORT:6379}
database: ${REDIS_DATABASE:0}
password: ${REDIS_PASSWORD:123456}
# ================== Security AES ==================
security:
aes:
# AES-256 密钥Base64编码必须与所有服务保持一致
# 警告:这是开发环境密钥,生产环境请使用密钥管理系统
secret-key: ${AES_SECRET_KEY:MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI=}
# ================== Dubbo ==================
dubbo:
protocol:
name: dubbo
port: -1
registry:
address: nacos://${NACOS_SERVER_ADDR:127.0.0.1:8848}
# ================== MyBatis-Plus ==================
mybatis-plus:
mapper-locations: classpath:mapper/**/*.xml
type-aliases-package: org.xyzh.common.dto, org.xyzh.api
# ================== SpringDoc 基础配置 ==================
springdoc:
api-docs:
enabled: true
path: /v3/api-docs
swagger-ui:
enabled: true
path: /swagger-ui.html
# ================== Logging ==================
logging:
config: classpath:log4j2.xml
charset:
console: UTF-8
file: UTF-8