You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

311 lines
10 KiB
YAML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

server:
port: 8086
address: 0.0.0.0 # 新增此行
spring:
servlet:
multipart:
enabled: true
max-file-size: 200MB
max-request-size: 200MB
#注: 切换数据库时需要将项目根目录中的.init文件删除再重启
# <<=======内置H2数据库连接设置开始==========
# jpa:
# show-sql: false
# hibernate:
# ddl-auto: update
# properties:
# hibernate:
# format_sql: true
# datasource:
# type: com.zaxxer.hikari.HikariDataSource
# driverClassName: org.h2.Driver
# url: jdbc:h2:./data/iotkit;MODE=MySQL
# username: sa
# password: 123456
# hikari:
# connection-timeout: 10000
# idle-timeout: 60000 # 经过idle-timeout时间如果连接还处于空闲状态, 该连接会被回收
# min-idle: 5 # 池中维护的最小空闲连接数, 默认为 10 个
# max-pool-size: 16 # 池中最大连接数, 包括闲置和使用中的连接, 默认为 10 个
# max-lifetime: 120000 # 如果一个连接超过了时长,且没有被使用, 连接会被回收
# is-auto-commit: true
# # 内置h2 web console设置
# platform: h2
# h2:
# console:
# enabled: true
# path: /h2
# settings:
# web-allow-others: true
#=======内置H2数据库连接设置结束==========>>
# <<==========mysql配置开始==============
jpa:
database: MySQL
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
show-sql: false
hibernate:
ddl-auto: update
properties:
hibernate:
format_sql: false
use_sql_comments: false # 输出SQL注释
generate_statistics: false # 关闭统计信息
session_factory:
# statement_inspector: com.example.TenantSQLInterceptor
# dialect: org.hibernate.dialect.MySQL5Dialect
datasource:
type: com.zaxxer.hikari.HikariDataSource
driverClassName: com.mysql.cj.jdbc.Driver
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
url: jdbc:mysql://172.16.0.64:3306/hma_iot?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&useSSL=false
# url: jdbc:mysql://123.57.78.108:3306/hma_iot_test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&useSSL=false
username: root
password: 1093e4769496a6ed
#password: CGKhbMfrdz6w3icX
hikari:
connection-timeout: 10000
idle-timeout: 60000 # 经过idle-timeout时间如果连接还处于空闲状态, 该连接会被回收
min-idle: 5 # 池中维护的最小空闲连接数, 默认为 10 个
max-pool-size: 16 # 池中最大连接数, 包括闲置和使用中的连接, 默认为 10 个
max-lifetime: 120000 # 如果一个连接超过了时长,且没有被使用, 连接会被回收
is-auto-commit: true
# ============mysql配置结束============>>
#<<================es时序数据配置开始===============
elasticsearch:
embedded:
# 是否启用内部es
enabled: false
port: 9301
rest:
#使用内置es的配置
#uris: http://elasticsearch:9200
# uris: http://123.57.78.108:9301
uris: http://172.16.0.64:9301
username: elastic
password: hmkj@2023
connection-timeout: 10s
#================es时序数据配置结束===============>>
#<<===========tdengine时序数据库配置开始============
# td-datasource:
# url: jdbc:TAOS-RS://172.17.60.206:6041/iotkit?timezone=UTC-8&charset=UTF-8&locale=en_US.UTF-8
# username: root
# password: taosdata
# driverClassName: com.taosdata.jdbc.rs.RestfulDriver
#===========tdengine时序数据库配置开始============>>
#<<===========iotdb时序数据库配置开始============
# iotdb-datasource:
# host: 127.0.0.1
# port: 6667
# username: root
# password: root
#===========tdengine时序数据库配置开始============>>
redis:
#使用内置redis的配置
embedded:
enabled: false
#host: redis
# host: 123.57.78.108
host: 172.16.0.64
port: 6379
database: 11
password: HMkj@2023
mvc:
pathmatch:
matching-strategy: path_pattern_parser
# profiles:
# active: mysql
#application.yml中打开注释支持rocketMq作为消息总线pom.xml中打开注释使用rocketmq消息总线
#rocketmq:
# name-server: 172.16.1.113:9876
# producer:
# group: iotkit
#图片存储用的是阿里云oss如果需要上传产品图片才需要配置
aliyun:
bucketId:
endpoint:
accessKeyId:
accessKeySecret:
sa-token:
# token名称 (同时也是cookie名称)
token-name: token
# token有效期单位s 默认30天, -1代表永不过期
timeout: 2592000
# token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
activity-timeout: -1
# 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
is-concurrent: true
# 在多人登录同一账号时是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
is-share: false
# token风格
token-style: uuid
# 是否输出操作日志
is-log: false
captcha:
enable: true
# 页面 <参数设置> 可开启关闭 验证码校验
# 验证码类型 math 数组计算 char 字符验证
type: MATH
# line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
category: CIRCLE
# 数字验证码位数
numberLength: 1
# 字符验证码长度
charLength: 4
# 用户配置
user:
password:
# 密码最大错误次数
maxRetryCount: 100
# 密码锁定时间默认10分钟
lockTime: 10
# openapi配置
openapi:
appid: 123456789
password: 123456
oss:
region: xxxxx
endpoint: xxxxx
accessKey: xxxxx
secretKey: xxxxx
buckName: xxxx
#微信小程序配置
weixin:
appid: xx
secret: xx
authUrl: xx
websocket:
enabled: true
path: /websocket
allowedOrigins: '*'
--- # mail 邮件发送
mail:
enabled: false
host: smtp.163.com
port: 465
# 是否需要用户名密码验证
auth: true
# 发送方遵循RFC-822标准
from: xxx@163.com
# 用户名注意如果使用foxmail邮箱此处user为qq号
user: xxx@163.com
# 密码注意某些邮箱需要为SMTP服务单独设置密码详情查看相关帮助
pass: xxxxxxxxxx
# 使用 STARTTLS安全连接STARTTLS是对纯文本通信协议的扩展。
starttlsEnable: true
# 使用SSL安全连接
sslEnable: true
# SMTP超时时长单位毫秒缺省值不超时
timeout: 0
# Socket连接超时值单位毫秒缺省值不超时
connectionTimeout: 0
--- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
# https://wind.kim/doc/start 文档地址 各个厂商可同时使用
sms:
# 阿里云 dysmsapi.aliyuncs.com
alibaba:
#请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
requestUrl: dysmsapi.aliyuncs.com
#阿里云的accessKey
accessKeyId: LTAI5tRvZgzGtmvTgmL3Zxre
#阿里云的accessKeySecret
accessKeySecret: FkHPDXJ8l3RRTRUqa4wDf8c3DIoZqI
#短信签名
signature: 天津费加罗电子
tencent:
#请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
requestUrl: sms.tencentcloudapi.com
#腾讯云的accessKey
accessKeyId: xxxxxxx
#腾讯云的accessKeySecret
accessKeySecret: xxxxxxx
#短信签名
signature: 测试
#短信sdkAppId
sdkAppId: appid
#地域信息默认为 ap-guangzhou 如无特殊改变可不用设置
territory: ap-guangzhou
wx:
mp: # 公众号配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-mp-spring-boot-starter/README.md 文档
# app-id: wx041349c6f39b268b # 测试号(牛希尧提供的)
# secret: 5abee519483bc9f8cb37ce280e814bd0
app-id: wxe91b094575c77799 # 测试号(自己的)
secret: f82e4e73c8d5f3ff2ee2e3c128b88a66
# app-id: wxa69ab825b163be19 # 测试号Kongdy 提供的)
# secret: bd4f9fab889591b62aeac0d7b8d8b4a0
# 存储配置,解决 AccessToken 的跨节点的共享
config-storage:
type: RedisTemplate # 采用 RedisTemplate 操作 Redis会自动从 Spring 中获取
key-prefix: wx # Redis Key 的前缀
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
miniapp: # 小程序配置(必填),参见 https://github.com/Wechat-Group/WxJava/blob/develop/spring-boot-starters/wx-java-miniapp-spring-boot-starter/README.md 文档
# appid: wx62056c0d5e8db250 # 测试号(牛希尧提供的)
# secret: 333ae72f41552af1e998fe1f54e1584a
#appid: wx53b5ac263b9cdb5b # wenhualian的接口测试号
#secret: baa127ca662344cf9b0b8e52b26bac9d
appid: wxe91b094575c77799 # 测试号
secret: f82e4e73c8d5f3ff2ee2e3c128b88a66
# appid: wxc4598c446f8a9cb3 # 测试号Kongdy 提供的)
# secret: 4a1a04e07f6a4a0751b39c3064a92c8b
config-storage:
type: RedisTemplate # 采用 RedisTemplate 操作 Redis会自动从 Spring 中获取
key-prefix: wa # Redis Key 的前缀
http-client-type: HttpClient # 采用 HttpClient 请求微信公众号平台
# 插件配置
plugin:
runMode: prod
mainPackage: cc.iotkit
pluginPath:
- ./data/plugins
# 设备同步配置(盐城设备台账同步、盐城/南京实时数据转发)
# 联调前保持 enable=false避免误推数据
device-sync:
enable: false
retry: 3
# DES/CBC/PKCS5Padding 加密密钥(需 8 字节,与甲方 DesUtil.java 一致)
encrypt-key: ""
# 对接厂商名称
docking-company: 天津费加罗电子
# 盐城-设备新增/修改
add-or-edit-url: http://gas.safeyancheng.cn:8888/ycxf/ycDevice/addorEdit
# 盐城-设备删除
delete-url: http://gas.safeyancheng.cn:8888/ycxf/ycDevice/deleteByCode
# 盐城-实时数据
yancheng-realtime-url: http://jiekou.safeyancheng.cn:8889/gas/dockingData
# 南京-远传数据(测试环境)
nanjing-report-url: http://36.7.170.39:9880/crgas/cr/alarm/remoteTrans/receive
# 参与同步的产品白名单FIGARO 燃气报警器相关产品 key
sync-product-keys:
- CEMpmANABN7Tt6Jh # 家用报警器
- XmXYxjzihseT76As # 独立式报警器
- bAASX8tBjYQjBGFP # 工商业控制器
- WfpZZFkMxxbGfRca # 动火离人
- MQFejp7cyDMH3enG # 联动控制箱
yancheng-realtime-enable: false
nanjing-enable: false
heartbeat-interval-seconds: 10
# 事件类消息去重窗口(秒)
dedup-seconds: 5
# 盐城 deviceCode 使用设备名IMEI
use-device-name-as-code: true