You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
331 lines
9.6 KiB
331 lines
9.6 KiB
server:
|
|
port: 8085
|
|
servlet:
|
|
context-path: /thing
|
|
spring:
|
|
cache:
|
|
type: caffeine # 支持 redis/caffeine, 当选择redis时,要在application.yml中配置redis连接信息
|
|
main:
|
|
allow-bean-definition-overriding: true
|
|
allow-circular-references: true
|
|
servlet:
|
|
multipart:
|
|
max-file-size: 100MB
|
|
max-request-size: 100MB
|
|
enabled: true
|
|
task:
|
|
execution:
|
|
pool:
|
|
max-size: 12
|
|
core-size: 6
|
|
keep-alive: 60s
|
|
queue-capacity: 100
|
|
allow-core-thread-timeout: true
|
|
thread-name-prefix: Async-线程池--
|
|
shutdown:
|
|
await-termination: true
|
|
await-termination-period: 3s
|
|
datasource:
|
|
type: com.zaxxer.hikari.HikariDataSource
|
|
hikari:
|
|
# 最大连接池数量
|
|
maximum-pool-size: 20
|
|
# 最小空闲线程数量
|
|
minimum-idle: 10
|
|
# 配置获取连接等待超时的时间
|
|
connectionTimeout: 30000
|
|
# 校验超时时间
|
|
validationTimeout: 5000
|
|
# 空闲连接存活最大时间,默认10分钟
|
|
idleTimeout: 600000
|
|
# 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
|
|
maxLifetime: 1800000
|
|
# 多久检查一次连接的活性
|
|
keepaliveTime: 30000
|
|
messages:
|
|
encoding: UTF-8
|
|
basename: i18n/messages
|
|
data:
|
|
redis:
|
|
host: 192.168.188.185
|
|
port: 7963
|
|
password: Sddt8888!
|
|
database: 5
|
|
|
|
#tskv遥测数据数据源配置
|
|
database:
|
|
ts_kv:
|
|
type: timescale # 时序数据存储类型 clickhouse/timescale/postgresql/tidb/mysql
|
|
latest:
|
|
type: timescale # 最新数据存储类型 postgresql/timescale/mysql/tidb/clickhouse
|
|
save_maximumPoolSize: 12
|
|
# 数据源及mybatis、mybatis-flex配置
|
|
mybatis-flex:
|
|
#是否开启审计日志打印
|
|
auditEnable: false
|
|
#mapper 包扫描路径
|
|
typeAliasesPackage: com.thing.**.mapper
|
|
#mapper 扫描路径
|
|
mapperLocations: classpath*:/mapper/**/*.xml
|
|
#本部分(Configuration)的配置都为 MyBatis 原生支持的配置
|
|
configuration:
|
|
mapUnderscoreToCamelCase: true
|
|
autoMappingBehavior: FULL
|
|
autoMappingUnknownColumnBehavior: NONE
|
|
cacheEnabled: true
|
|
global-config:
|
|
print-banner: true
|
|
normal-value-of-logic-delete: 0
|
|
deleted-value-of-logic-delete: 1
|
|
#数据眼配置
|
|
datasource:
|
|
#物管理数据源
|
|
pg-thing:
|
|
type: com.zaxxer.hikari.HikariDataSource
|
|
url: jdbc:postgresql://1.94.32.181:5432/thing
|
|
driver-class-name: org.postgresql.Driver
|
|
username: postgres
|
|
password: sddt8888
|
|
#遥测数据数据眼
|
|
pg-tskv:
|
|
type: com.zaxxer.hikari.HikariDataSource
|
|
url: jdbc:postgresql://1.94.32.181:5432/thing
|
|
driver-class-name: org.postgresql.Driver
|
|
username: postgres
|
|
password: sddt8888
|
|
#其他第三方数据接入,或业务需要追加数据源
|
|
# sqlServer:
|
|
# type: com.zaxxer.hikari.HikariDataSource
|
|
# url: jdbc:sqlserver://127.0.0.1:1433;databaseName=销售生产其他
|
|
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
|
# username: czj
|
|
# password: 1234
|
|
|
|
# 区间统计计算相关配置
|
|
calculate:
|
|
am_total:
|
|
offset: 24 #当数据出现断点时,向后偏移查询多少小时
|
|
interval: 15 # 分区间统计,间隔时长(分)1/3/5/10/15/20/30/60 CO2_vol
|
|
keys: A29,B2,C2,C6,D2,D4,E3,E4,F4,G2,G4,H2,I2,I4,K2,N2,N4,P4,Q2,R2,R4,S2,S4,F2,T2,T4,U2,U4,J2,J4,L2,A30,P2,Q4,V2,V4,A29_rush,A29_peak,A29_valley,A29_normal,A29_generate,A30_rush,A30_peak,A30_valley,A30_normal,tce_C6,tce_A29,tce_E3,CO2_A29,CO2_C6,CO2_E3,CO2_run,tce_run,tce_E3,A201,A202,A204,tce_J2,gdp,tce,tce_vol,tce_B2,tce_H2,firms,CO2,CO2_subtr
|
|
ddmmyy: #例如:每月1号0时0分 开始统计年/月/日用量
|
|
start_hh: 0 #小时/天/月/年 用量统计开始的分钟数(0-59)
|
|
start_dd: 0 #天/月/年 用量统计开始的小时(0-23)
|
|
start_mm: 1 #月/年 用量统计开始的天(1-30)
|
|
start_yy: 1 #年 用量统计开始的月份(1-12)
|
|
maximumPoolSize: 12
|
|
#登录页面配置
|
|
login:
|
|
#登录页title说明
|
|
title:
|
|
#企业签名
|
|
sign: ck
|
|
#座机
|
|
technical:
|
|
#联系电话
|
|
phone:
|
|
#物管理相关配置
|
|
thing:
|
|
#看板相关地图文件路径
|
|
map-bucket: geojson
|
|
# token 过期时间 30天
|
|
token:
|
|
expire: 2592000
|
|
# 产品碳足迹 相关配置
|
|
carbon:
|
|
syncButton: false
|
|
pub:
|
|
# 公共服务侧租户标识
|
|
tenantTag: 公共服务
|
|
api:
|
|
secret: nba!w^0@01
|
|
|
|
##数据解析配置
|
|
nashorn:
|
|
# JS Eval max request timeout. 0 - no timeout
|
|
max_requests_timeout: 0
|
|
# Specify thread pool size for javascript executor service
|
|
js_thread_pool_size: 120
|
|
# Specify thread pool size for JavaScript sandbox resource monitor
|
|
monitor_thread_pool_size: 12
|
|
# Maximum CPU time in milliseconds allowed for script execution
|
|
max_cpu_time: 8000
|
|
tbel:
|
|
# JS Eval max request timeout. 0 - no timeout
|
|
max_requests_timeout: 0
|
|
# Specify thread pool size for javascript executor service
|
|
thread_pool_size: 100
|
|
# Maximum allowed TBEL script execution memory
|
|
max_memory_limit_mb: 8
|
|
compiled_scripts_cache_size: 1000
|
|
aviator:
|
|
# JS Eval max request timeout. 0 - no timeout
|
|
max_requests_timeout: 0
|
|
# Specify thread pool size for javascript executor service
|
|
js_thread_pool_size: 100
|
|
# Whether to put capturing groups into passed-in env map
|
|
# when regular-expression pattern matches
|
|
put_capturing_groups_into_env: false
|
|
# Max loop count to prevent too much CPU consumption. If it's value is zero or negative, it means
|
|
# no limitation on loop count.Default is zero.
|
|
max_loop_count: 1000
|
|
|
|
actors:
|
|
system:
|
|
# 每个邮箱处理完这些数量的邮件后会重新找一个线程池中的线程进行消费,避免单个线程占用过多CPU
|
|
throughput: 5
|
|
# actor系统最大重启次数
|
|
maxActorInitAttempts: 3
|
|
# 定时线程数,目前没什么用
|
|
schedulerPoolSize: 1
|
|
# 顶级转发器线程数,由于不需要做任何实质性操作,因此只需要单线程即可
|
|
rootDispatcherSize: 1
|
|
# 租户线程可能会涉及到业务操作,给2个线程
|
|
tenantDispatcherSize: 2
|
|
# 非租户线程也可能会涉及到业务操作,给2个线程
|
|
nonTenantDispatcherSize: 2
|
|
# 设备处理是直接涉及到业务操作的,因此可以给多一点线程数,具体多少看企业数据量
|
|
device-dispatcher-size: 4
|
|
|
|
#队列相关配置
|
|
queue:
|
|
type: in-memory # 队列类型: inMemory / disruptor
|
|
inMemory:
|
|
maxSize: 500
|
|
pollInterval: 100
|
|
disruptor:
|
|
maximumPoolSize: 8
|
|
bufferSize: 256 # 指定ringbuffer字节大小,当前值将乘1024
|
|
partitions:
|
|
hash_function_name: murmur3_128 # murmur3_32, murmur3_128 or sha256
|
|
core:
|
|
topic: queue_core
|
|
poll-interval: 1000
|
|
partitions: 30
|
|
debug: false
|
|
log-interval: 300
|
|
rabbitmq:
|
|
exchange_name:
|
|
host: localhost
|
|
port: 5673
|
|
virtual_host: /
|
|
username: guest
|
|
password: guest
|
|
automatic_recovery_enabled: false
|
|
connection_timeout: 60000
|
|
handshake_timeout: 10000
|
|
queue-properties:
|
|
core: x-max-length-bytes:1048576000;x-message-ttl:604800000
|
|
|
|
transport:
|
|
# Enable/disable http/mqtt/... transport protocols (has higher priority than certain protocol's 'enabled' property)
|
|
api_enabled: true
|
|
sessions:
|
|
inactivity_timeout: 300000
|
|
report_timeout: 30000
|
|
rate_limits:
|
|
enabled: false
|
|
# 1s 10次,60s 300次
|
|
device: 10:1,300:60
|
|
# Local HTTP transport parameters
|
|
http:
|
|
# Enable/disable http transport protocol.
|
|
enabled: false
|
|
request_timeout: 60000
|
|
# Local MQTT transport parameters
|
|
mqtt:
|
|
# Enable/disable mqtt transport protocol.
|
|
enabled: false
|
|
bind_address: 0.0.0.0
|
|
bind_port: 1883
|
|
timeout: 10000
|
|
netty:
|
|
leak_detector_level: DISABLED
|
|
boss_group_thread_count: 1
|
|
worker_group_thread_count: 12
|
|
max_payload_size: 65536
|
|
so_keep_alive: false
|
|
#告警模块 配置
|
|
alarm:
|
|
event_bus:
|
|
queue_size: 50
|
|
core_pool_size: 5
|
|
max_pool_size: 20
|
|
|
|
#swagger 文档配置
|
|
springdoc:
|
|
swagger-ui:
|
|
path: /swagger-ui.html
|
|
packages-to-scan: com.thing
|
|
api-docs:
|
|
enabled: true
|
|
# knife4j的增强配置,不需要增强可以不配
|
|
knife4j:
|
|
enable: true
|
|
setting:
|
|
language: zh_cn
|
|
#数据过滤配置
|
|
filter:
|
|
rule:
|
|
enable: false
|
|
#项目状态
|
|
management:
|
|
health:
|
|
redis:
|
|
enabled: false
|
|
endpoints:
|
|
enabled-by-default: true #暴露所有端点信息
|
|
web:
|
|
exposure:
|
|
include: '*' #以web方式暴露
|
|
|
|
# 缓存管理
|
|
cache-manager:
|
|
specs:
|
|
security:
|
|
timeToLiveInMinutes: 10
|
|
maxSize: 50
|
|
thingModel:
|
|
timeToLiveInMinutes: 1440
|
|
maxSize: 10000
|
|
authThingCodes:
|
|
timeToLiveInMinutes: 1440
|
|
maxSize: 10000
|
|
thingEntity:
|
|
timeToLiveInMinutes: 1440
|
|
maxSize: 10000
|
|
thingDict:
|
|
timeToLiveInMinutes: 1440
|
|
maxSize: 10000
|
|
thingDictRelation:
|
|
timeToLiveInMinutes: 1440
|
|
maxSize: 10000
|
|
thingDetailRelation:
|
|
timeToLiveInMinutes: 1440
|
|
maxSize: 10000
|
|
thingRootRelation:
|
|
timeToLiveInMinutes: 1440
|
|
maxSize: 10000
|
|
thingCalcConfig:
|
|
timeToLiveInMinutes: 525600
|
|
maxSize: 10000
|
|
filterRule:
|
|
timeToLiveInMinutes: 525600
|
|
maxSize: 10000
|
|
alarmRule:
|
|
timeToLiveInMinutes: 525600
|
|
maxSize: 1000
|
|
alarmRuleEntity:
|
|
timeToLiveInMinutes: 525600
|
|
maxSize: 1000
|
|
alarmRuleAction:
|
|
timeToLiveInMinutes: 525600
|
|
maxSize: 1000
|
|
scriptInfo:
|
|
timeToLiveInMinutes: 525600
|
|
maxSize: 1000
|
|
mockDataConfig:
|
|
timeToLiveInMinutes: 525600
|
|
maxSize: 1000
|
|
mockDataLatestTime:
|
|
timeToLiveInMinutes: 525600
|
|
maxSize: 1000
|