162 lines
7.4 KiB
YAML
162 lines
7.4 KiB
YAML
# 数据源配置
|
||
spring:
|
||
datasource:
|
||
dynamic:
|
||
druid:
|
||
initial-size: 5
|
||
min-idle: 10
|
||
max-wait: 60000
|
||
max-active: 20
|
||
timeBetweenEvictionRunsMillis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||
minEvictableIdleTimeMillis: 300000 # 配置一个连接在池中最小生存的时间,单位是毫秒
|
||
maxEvictableIdleTimeMillis: 900000 # 配置一个连接在池中最大生存的时间,单位是毫秒
|
||
validation-query: 'SELECT 1'
|
||
testWhileIdle: true
|
||
testOnBorrow: false
|
||
testOnReturn: false
|
||
datasource:
|
||
master:
|
||
type: com.alibaba.druid.pool.DruidDataSource
|
||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||
url: jdbc:mysql://177.7.0.11:3306/fastbee?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||
username: root
|
||
password: fastbee
|
||
druid:
|
||
filters: stat,wall
|
||
stat:
|
||
# 慢SQL记录
|
||
log-slow-sql: true
|
||
slow-sql-millis: 1000
|
||
merge-sql: true
|
||
wall:
|
||
none-base-statement-allow: true
|
||
taos: # 配置 taos 数据源
|
||
enabled: false
|
||
type: com.alibaba.druid.pool.DruidDataSource
|
||
driver-class-name: com.taosdata.jdbc.TSDBDriver
|
||
url: jdbc:TAOS://fastbee:6030/fastbee_log?timezone=UTC-8&charset=utf-8
|
||
username: root
|
||
password: taosdata
|
||
dbName: fastbee_log
|
||
# slave:
|
||
# type: com.alibaba.druid.pool.DruidDataSource
|
||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||
# url: jdbc:mysql://localhost:3306/fastbee1?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||
# username: root
|
||
# password: fastbee
|
||
# ===== ShardingSphere 分库分表配置(已禁用)=====
|
||
# 如需启用分库分表,请取消以下注释
|
||
# shardingsphere:
|
||
# # props:
|
||
# # 是否显示 ShardingSpher 的sql,用于Debug
|
||
# # sql-show: true
|
||
# datasource:
|
||
# # 配置真实数据源
|
||
# names: ds0
|
||
# ds0: # 配置 mysql 数据源
|
||
# type: com.alibaba.druid.pool.DruidDataSource
|
||
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||
# url: jdbc:mysql://177.7.0.11:3306/fastbee?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||
# username: root
|
||
# password: fastbee
|
||
# filters: stat,wall
|
||
# filter:
|
||
# stat:
|
||
# enabled: true
|
||
# # 慢SQL记录
|
||
# log-slow-sql: true
|
||
# slow-sql-millis: 1000
|
||
# merge-sql: true
|
||
# wall:
|
||
# config:
|
||
# multi-statement-allow: true
|
||
#
|
||
# rules: # 配置表规则
|
||
# sharding:
|
||
# # 表策略配置
|
||
# tables:
|
||
# # iot_device_log 是逻辑表
|
||
# iot_device_log:
|
||
# actualDataNodes: ds0.iot_device_log_$->{2024..2030}0$->{1..9},ds0.iot_device_log_$->{2024..2030}1$->{0..2}
|
||
# tableStrategy:
|
||
# # 使用标准分片策略
|
||
# standard:
|
||
# # 配置分片字段
|
||
# shardingColumn: create_time
|
||
# # 分片算法名称,不支持大写字母和下划线,否则启动就会报错
|
||
# shardingAlgorithmName: time-sharding-algorithm
|
||
# # 分片算法配置
|
||
# shardingAlgorithms:
|
||
# # 分片算法名称,不支持大写字母和下划线,否则启动就会报错
|
||
# time-sharding-algorithm:
|
||
# # 类型:自定义策略
|
||
# type: CLASS_BASED
|
||
# props:
|
||
# # 分片策略
|
||
# strategy: standard
|
||
# # 分片算法类
|
||
# algorithmClassName: com.fastbee.framework.config.sharding.TimeShardingAlgorithm
|
||
# redis 配置
|
||
redis:
|
||
host: 177.7.0.10 # 地址
|
||
port: 6379 # 端口,默认为6379
|
||
database: 0 # 数据库索引
|
||
password: fastbee # 密码
|
||
timeout: 10s # 连接超时时间
|
||
lettuce:
|
||
pool:
|
||
min-idle: 0 # 连接池中的最小空闲连接
|
||
max-idle: 8 # 连接池中的最大空闲连接
|
||
max-active: 8 # 连接池的最大数据库连接数
|
||
max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||
# mqtt 配置
|
||
mqtt:
|
||
username: fastbee # 账号(仅用于后端自认证)
|
||
password: fastbee # 密码(仅用于后端自认证)
|
||
host-url: tcp://177.7.0.12:1883 # 连接 Emqx 消息服务器地址
|
||
#host-url: tcp://177.7.0.13:1883 # 内置netty mqtt broker地址
|
||
client-id: ${random.int} # 客户端Id,不能相同,采用随机数 ${random.value}
|
||
default-topic: test # 默认主题
|
||
timeout: 30 # 超时时间
|
||
keepalive: 30 # 保持连接
|
||
clearSession: true # 清除会话(设置为false,断开连接,重连后使用原来的会话 保留订阅的主题,能接收离线期间的消息)
|
||
# EMQX API配置需要在运行emqx之后去EMQX管理后台手动创建API Key和Secret,并配置到application.yml中
|
||
emqx:
|
||
host: 177.7.0.12 # EMQX服务器地址
|
||
port: 18083
|
||
ApiKey: b3da45a649948d18 # EMQX API Key
|
||
ApiSecret: tMbf5EEZFb08sut88i4tZscxTc9CE3gaRQewSOTRNvWL
|
||
# sip 配置
|
||
sip:
|
||
enabled: true # 是否启用视频监控SIP,true为启用
|
||
## 本地调试时,绑定网卡局域网IP,设备在同一局域网,设备接入IP填写绑定IP
|
||
## 部署服务端时,默认绑定容器IP,设备接入IP填写服务器公网IP
|
||
ip: 177.7.0.13 # 容器部署容器IP:177.7.0.13;云服务器部署写公网IP;本地部署127.0.0.1;总原则:能被摄像机访问的地址
|
||
port: 5061 # SIP端口(保持默认)
|
||
domain: 3402000000 # 由省级、市级、区级、基层编号组成
|
||
id: 34020000002000000001 # 同上,另外增加编号,(可保持默认)
|
||
password: 12345678 # 监控设备接入的密码
|
||
log: false
|
||
zlmRecordPath: /opt/media/bin/www
|
||
mp4MaxSecond: 30 # 视频录像时长,单位秒
|
||
# SIP安全防护配置
|
||
security:
|
||
enabled: true # 是否启用安全防护
|
||
rate-limit: 5 # 每分钟最大请求数(生产环境更严格)
|
||
block-threshold: 10 # 触发封禁的请求次数
|
||
block-duration: 10080 # 封禁时长(分钟)一个星期
|
||
|
||
# 日志配置
|
||
logging:
|
||
level:
|
||
com.fastbee: debug
|
||
com.yomahub: warn
|
||
org.dromara: warn
|
||
org.springframework: warn
|
||
com.baomidou: info
|
||
|
||
# Swagger配置
|
||
swagger:
|
||
enabled: true # 是否开启swagger
|
||
pathMapping: /prod-api # 请求前缀
|