Files
aiot-platform-cloud/viewsh-module-iot/viewsh-module-iot-server/src/main/resources/application-prod.yaml
lzh 26e909cce9
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
fix(deploy): 迁移Nacos/TDengine/XXL-Job至Infra服务器(172.17.16.7)
将基础设施服务地址从Prod服务器(172.17.16.14)统一迁移至Infra服务器(172.17.16.7):
- Nacos: 172.17.16.14:8848 → 172.17.16.7:8848
- TDengine: 172.17.16.14:6041 → 172.17.16.7:6041
- XXL-Job: 172.17.16.14:19090 → 172.17.16.7:19090

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 11:22:02 +08:00

157 lines
5.0 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.

--- #################### 注册中心 + 配置中心相关配置 ####################
spring:
cloud:
nacos:
server-addr: ${NACOS_ADDR:172.17.16.7:8848}
username: ${NACOS_USERNAME:nacos}
password: ${NACOS_PASSWORD:nacos}
discovery:
namespace: ${NACOS_DISCOVERY_NAMESPACE:prod}
group: DEFAULT_GROUP
metadata:
version: 1.0.0
config:
namespace: ${NACOS_CONFIG_NAMESPACE:prod}
group: DEFAULT_GROUP
file-extension: yaml
refresh-enabled: true
--- #################### 数据库相关配置 ####################
spring:
datasource:
druid:
web-stat-filter:
enabled: true
stat-view-servlet:
enabled: true
url-pattern: /druid/*
login-username: ${DRUID_USERNAME:admin}
login-password: ${DRUID_PASSWORD:admin}
filter:
stat:
enabled: true
log-slow-sql: true
slow-sql-millis: 100
merge-sql: true
wall:
config:
multi-statement-allow: true
dynamic:
druid:
initial-size: 5
min-idle: 10
max-active: 20
max-wait: 60000
time-between-eviction-runs-millis: 60000
min-evictable-idle-time-millis: 600000
max-evictable-idle-time-millis: 1800000
validation-query: SELECT 1 FROM DUAL
test-while-idle: true
test-on-borrow: false
test-on-return: false
pool-prepared-statements: true
max-pool-prepared-statement-per-connection-size: 20
primary: master
datasource:
master:
url: jdbc:mysql://${MYSQL_HOST:172.17.16.8}:${MYSQL_PORT:3306}/${MYSQL_DATABASE:aiot-platform-test}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
username: ${MYSQL_USER:root}
password: ${MYSQL_PASSWORD:}
slave:
lazy: true
url: jdbc:mysql://${MYSQL_SLAVE_HOST:${MYSQL_HOST:172.17.16.8}}:${MYSQL_SLAVE_PORT:${MYSQL_PORT:3306}}/${MYSQL_DATABASE:aiot-platform-test}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true&rewriteBatchedStatements=true
username: ${MYSQL_SLAVE_USER:${MYSQL_USER:root}}
password: ${MYSQL_SLAVE_PASSWORD:${MYSQL_PASSWORD:}}
tdengine:
url: jdbc:TAOS-RS://${TDENGINE_HOST:172.17.16.7}:${TDENGINE_PORT:6041}/aiot_platform
driver-class-name: com.taosdata.jdbc.rs.RestfulDriver
username: ${TDENGINE_USERNAME:root}
password: ${TDENGINE_PASSWORD:taosdata}
druid:
validation-query: SELECT SERVER_STATUS()
data:
redis:
host: ${REDIS_HOST:172.17.16.13}
port: ${REDIS_PORT:6379}
database: ${REDIS_DATABASE:0}
password: ${REDIS_PASSWORD:}
timeout: 5000ms
lettuce:
pool:
max-active: 8
max-wait: -1ms
max-idle: 8
min-idle: 0
--- #################### MQ 消息队列相关配置 ####################
rocketmq:
name-server: ${ROCKETMQ_NAMESRV_ADDR:rmq-4wd73bxpv.rocketmq.sh.qcloud.tencenttdmq.com:8080}
spring:
# 禁用 RabbitMQ 自动配置(如果不需要 RabbitMQ避免启动时连接失败
autoconfigure:
exclude:
- org.springframework.boot.autoconfigure.amqp.RabbitAutoConfiguration
# RabbitMQ 配置(已禁用自动配置,仅保留配置项供业务代码使用)
# rabbitmq:
# host: ${RABBITMQ_HOST:127.0.0.1}
# port: ${RABBITMQ_PORT:5672}
# username: ${RABBITMQ_USERNAME:guest}
# password: ${RABBITMQ_PASSWORD:guest}
kafka:
bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVERS:127.0.0.1:9092}
--- #################### 定时任务相关配置 ####################
xxl:
job:
admin:
addresses: ${XXL_JOB_ADMIN_ADDRESSES:http://172.17.16.7:19090/xxl-job-admin}
--- #################### 服务保障相关配置 ####################
lock4j:
acquire-timeout: 3000
expire: 30000
--- #################### 监控相关配置 ####################
management:
endpoints:
web:
base-path: /actuator
exposure:
include: '*'
spring:
boot:
admin:
client:
instance:
service-host-type: IP
username: ${SPRING_BOOT_ADMIN_USERNAME:admin}
password: ${SPRING_BOOT_ADMIN_PASSWORD:admin}
logging:
level:
root: INFO
com.viewsh: ${LOG_LEVEL:INFO}
com.viewsh.module.iot.dal.mysql: debug
com.viewsh.module.iot.dal.mysql.sms.SmsChannelMapper: INFO
org.springframework.context.support.PostProcessorRegistrationDelegate: ERROR
file:
name: ${LOG_FILE_PATH:/app/logs}/${spring.application.name}.log
--- #################### 芋道相关配置 ####################
viewsh:
demo: false
env:
tag: ${HOSTNAME:prod}
captcha:
enable: true
security:
mock-enable: false