Browse Source

设备管理-20240827优化1

thing_master
xiezw 1 year ago
parent
commit
4eab6bf100
  1. 276
      application/src/main/resources/application.yml

276
application/src/main/resources/application.yml

@ -1,541 +1,271 @@
server: server:
port: 8070
port: 18080
servlet: servlet:
context-path: /thing context-path: /thing
spring: spring:
cache: cache:
type: caffeine # 支持 redis/caffeine, 当选择redis时,要在application.yml中配置redis连接信息 type: caffeine # 支持 redis/caffeine, 当选择redis时,要在application.yml中配置redis连接信息
main: main:
allow-bean-definition-overriding: true allow-bean-definition-overriding: true
allow-circular-references: true allow-circular-references: true
servlet: servlet:
multipart: multipart:
max-file-size: 100MB max-file-size: 100MB
max-request-size: 100MB max-request-size: 100MB
enabled: true enabled: true
messages: messages:
encoding: UTF-8 encoding: UTF-8
basename: i18n/messages basename: i18n/messages
data: data:
redis: redis:
host: 192.168.188.185 host: 192.168.188.185
port: 7963 port: 7963
password: Sddt8888! password: Sddt8888!
database: 5 database: 5
#项目入口签名 #项目入口签名
title: title:
sign: ck #企业签名 sign: ck #企业签名
technical: technical:
phone: phone:
map-bucket: geojson #地图文件路径 map-bucket: geojson #地图文件路径
queue: queue:
type: in-memory # 队列类型: inMemory / disruptor type: in-memory # 队列类型: inMemory / disruptor
inMemory: inMemory:
maxSize: 500 maxSize: 500
pollInterval: 100 pollInterval: 100
disruptor: disruptor:
maximumPoolSize: 8 maximumPoolSize: 8
bufferSize: 256 # 指定ringbuffer字节大小,当前值将乘1024 bufferSize: 256 # 指定ringbuffer字节大小,当前值将乘1024
partitions: partitions:
hash_function_name: murmur3_128 # murmur3_32, murmur3_128 or sha256 hash_function_name: murmur3_128 # murmur3_32, murmur3_128 or sha256
core: core:
topic: queue_core topic: queue_core
poll-interval: 1000 poll-interval: 1000
partitions: 30 partitions: 30
debug: false debug: false
log-interval: 300 log-interval: 300
rabbitmq: rabbitmq:
exchange_name: exchange_name:
host: localhost host: localhost
port: 5673 port: 5673
virtual_host: / virtual_host: /
username: guest username: guest
password: guest password: guest
automatic_recovery_enabled: false automatic_recovery_enabled: false
connection_timeout: 60000 connection_timeout: 60000
handshake_timeout: 10000 handshake_timeout: 10000
queue-properties: queue-properties:
core: x-max-length-bytes:1048576000;x-message-ttl:604800000 core: x-max-length-bytes:1048576000;x-message-ttl:604800000
#数据源配置 #数据源配置
database: database:
ts_kv: ts_kv:
type: postgresql # 时序数据存储类型 clickhouse/timescale/postgresql/tidb/mysql type: postgresql # 时序数据存储类型 clickhouse/timescale/postgresql/tidb/mysql
latest: latest:
type: postgresql # 最新数据存储类型 postgresql/timescale/mysql/tidb/clickhouse type: postgresql # 最新数据存储类型 postgresql/timescale/mysql/tidb/clickhouse
save_maximumPoolSize: 12 save_maximumPoolSize: 12
# 数据源及mybatis、mybatis-flex配置 # 数据源及mybatis、mybatis-flex配置
mybatis-flex: mybatis-flex:
typeAliasesPackage: com.thing.**.mapper typeAliasesPackage: com.thing.**.mapper
mapperLocations: classpath*:/mapper/**/*.xml mapperLocations: classpath*:/mapper/**/*.xml
#本部分(Configuration)的配置都为 MyBatis 原生支持的配置,有关配置请参考:https://mybatis.org/mybatis-3/zh/configuration.html#%E8%AE%BE%E7%BD%AE%EF%BC%88settings%EF%BC%89 #本部分(Configuration)的配置都为 MyBatis 原生支持的配置,有关配置请参考:https://mybatis.org/mybatis-3/zh/configuration.html#%E8%AE%BE%E7%BD%AE%EF%BC%88settings%EF%BC%89
configuration: configuration:
mapUnderscoreToCamelCase: true mapUnderscoreToCamelCase: true
autoMappingBehavior: FULL autoMappingBehavior: FULL
autoMappingUnknownColumnBehavior: NONE autoMappingUnknownColumnBehavior: NONE
cacheEnabled: true cacheEnabled: true
global-config: global-config:
print-banner: true print-banner: true
normal-value-of-logic-delete: 0 normal-value-of-logic-delete: 0
deleted-value-of-logic-delete: 1 deleted-value-of-logic-delete: 1
datasource: datasource:
pg: pg:
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource
url: jdbc:postgresql://192.168.188.184:5432/thingbi_v3
url: jdbc:postgresql://192.168.188.185:5432/thing_v2
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
username: postgres username: postgres
password: sddt8888 password: sddt8888
postgresql: postgresql:
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource
url: jdbc:postgresql://192.168.188.184:5432/thingbi_v3
url: jdbc:postgresql://192.168.188.185:5432/thing_v2
driver-class-name: org.postgresql.Driver driver-class-name: org.postgresql.Driver
username: postgres username: postgres
password: sddt8888 password: sddt8888
sqlServer: sqlServer:
type: com.zaxxer.hikari.HikariDataSource type: com.zaxxer.hikari.HikariDataSource
url: jdbc:sqlserver://127.0.0.1:1433;databaseName=销售生产其他 url: jdbc:sqlserver://127.0.0.1:1433;databaseName=销售生产其他
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
username: czj username: czj
password: 1234 password: 1234
# 区间统计计算相关配置 # 区间统计计算相关配置
calculate: calculate:
am_total: am_total:
offset: 24 #当数据出现断点时,向后偏移查询多少小时 offset: 24 #当数据出现断点时,向后偏移查询多少小时
interval: 15 # 分区间统计,间隔时长(分)1/3/5/10/15/20/30/60 interval: 15 # 分区间统计,间隔时长(分)1/3/5/10/15/20/30/60
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 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
ddmmyy: #例如:每月1号0时0分 开始统计年/月/日用量 ddmmyy: #例如:每月1号0时0分 开始统计年/月/日用量
start_hh: 0 #小时/天/月/年 用量统计开始的分钟数(0-59) start_hh: 0 #小时/天/月/年 用量统计开始的分钟数(0-59)
start_dd: 0 #天/月/年 用量统计开始的小时(0-23) start_dd: 0 #天/月/年 用量统计开始的小时(0-23)
start_mm: 1 #月/年 用量统计开始的天(1-30) start_mm: 1 #月/年 用量统计开始的天(1-30)
start_yy: 1 #年 用量统计开始的月份(1-12) start_yy: 1 #年 用量统计开始的月份(1-12)
maximumPoolSize: 12 maximumPoolSize: 12
# 产品碳足迹 相关配置 # 产品碳足迹 相关配置
carbon: carbon:
syncButton: false syncButton: false
pub: pub:
# 公共服务侧租户标识 # 公共服务侧租户标识
tenantTag: 公共服务 tenantTag: 公共服务
api: api:
secret: nba!w^0@01 secret: nba!w^0@01
#物管理相关配置 #物管理相关配置
thing: thing:
# token 过期时间 30天 # token 过期时间 30天
token: token:
expire: 2592000 expire: 2592000
##数据解析配置 ##数据解析配置
nashorn: nashorn:
# JS Eval max request timeout. 0 - no timeout # JS Eval max request timeout. 0 - no timeout
max_requests_timeout: 0 max_requests_timeout: 0
# Specify thread pool size for javascript executor service # Specify thread pool size for javascript executor service
js_thread_pool_size: 120 js_thread_pool_size: 120
# Specify thread pool size for JavaScript sandbox resource monitor # Specify thread pool size for JavaScript sandbox resource monitor
monitor_thread_pool_size: 12 monitor_thread_pool_size: 12
# Maximum CPU time in milliseconds allowed for script execution # Maximum CPU time in milliseconds allowed for script execution
max_cpu_time: 8000 max_cpu_time: 8000
tbel: tbel:
# JS Eval max request timeout. 0 - no timeout # JS Eval max request timeout. 0 - no timeout
max_requests_timeout: 0 max_requests_timeout: 0
# Specify thread pool size for javascript executor service # Specify thread pool size for javascript executor service
thread_pool_size: 100 thread_pool_size: 100
# Maximum allowed TBEL script execution memory # Maximum allowed TBEL script execution memory
max_memory_limit_mb: 8 max_memory_limit_mb: 8
compiled_scripts_cache_size: 1000 compiled_scripts_cache_size: 1000
aviator: aviator:
# JS Eval max request timeout. 0 - no timeout # JS Eval max request timeout. 0 - no timeout
max_requests_timeout: 0 max_requests_timeout: 0
# Specify thread pool size for javascript executor service # Specify thread pool size for javascript executor service
js_thread_pool_size: 100 js_thread_pool_size: 100
# Whether to put capturing groups into passed-in env map # Whether to put capturing groups into passed-in env map
# when regular-expression pattern matches # when regular-expression pattern matches
put_capturing_groups_into_env: false 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 # 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. # no limitation on loop count.Default is zero.
max_loop_count: 1000 max_loop_count: 1000
#队列相关配置 #队列相关配置
transport: transport:
# Enable/disable http/mqtt/... transport protocols (has higher priority than certain protocol's 'enabled' property) # Enable/disable http/mqtt/... transport protocols (has higher priority than certain protocol's 'enabled' property)
api_enabled: true api_enabled: true
sessions: sessions:
inactivity_timeout: 300000 inactivity_timeout: 300000
report_timeout: 30000 report_timeout: 30000
rate_limits: rate_limits:
enabled: false enabled: false
# 1s 10次,60s 300次 # 1s 10次,60s 300次
device: 10:1,300:60 device: 10:1,300:60
# Local HTTP transport parameters # Local HTTP transport parameters
http: http:
# Enable/disable http transport protocol. # Enable/disable http transport protocol.
enabled: false enabled: false
request_timeout: 60000 request_timeout: 60000
# Local MQTT transport parameters # Local MQTT transport parameters
mqtt: mqtt:
# Enable/disable mqtt transport protocol. # Enable/disable mqtt transport protocol.
enabled: false enabled: false
bind_address: 0.0.0.0 bind_address: 0.0.0.0
bind_port: 1883 bind_port: 1883
timeout: 10000 timeout: 10000
netty: netty:
leak_detector_level: DISABLED leak_detector_level: DISABLED
boss_group_thread_count: 1 boss_group_thread_count: 1
worker_group_thread_count: 12 worker_group_thread_count: 12
max_payload_size: 65536 max_payload_size: 65536
so_keep_alive: false so_keep_alive: false
#告警模块 配置 #告警模块 配置
alarm: alarm:
event_bus: event_bus:
queue_size: 50 queue_size: 50
core_pool_size: 5 core_pool_size: 5
max_pool_size: 20 max_pool_size: 20
#swagger 文档配置 #swagger 文档配置
springdoc: springdoc:
swagger-ui: swagger-ui:
path: /swagger-ui.html path: /swagger-ui.html
packages-to-scan: com.thing packages-to-scan: com.thing
api-docs: api-docs:
enabled: true enabled: true
# knife4j的增强配置,不需要增强可以不配 # knife4j的增强配置,不需要增强可以不配
knife4j: knife4j:
enable: true enable: true
setting: setting:
language: zh_cn language: zh_cn
#数据过滤配置 #数据过滤配置
filter: filter:
rule: rule:
enable: false enable: false
#项目状态 #项目状态
management: management:
health: health:
redis: redis:
enabled: false enabled: false
endpoints: endpoints:
enabled-by-default: true #暴露所有端点信息 enabled-by-default: true #暴露所有端点信息
web: web:
exposure: exposure:
include: '*' #以web方式暴露 include: '*' #以web方式暴露
# 缓存管理 # 缓存管理
cache-manager: cache-manager:
specs: specs:
security: security:
timeToLiveInMinutes: 10 timeToLiveInMinutes: 10
maxSize: 50 maxSize: 50
thingModel: thingModel:
timeToLiveInMinutes: 1440 timeToLiveInMinutes: 1440
maxSize: 10000 maxSize: 10000
authThingCodes: authThingCodes:
timeToLiveInMinutes: 1440 timeToLiveInMinutes: 1440
maxSize: 10000 maxSize: 10000
thingEntity: thingEntity:
timeToLiveInMinutes: 1440 timeToLiveInMinutes: 1440
maxSize: 10000 maxSize: 10000
thingDict: thingDict:
timeToLiveInMinutes: 1440 timeToLiveInMinutes: 1440
maxSize: 10000 maxSize: 10000
thingDictRelation: thingDictRelation:
timeToLiveInMinutes: 1440 timeToLiveInMinutes: 1440
maxSize: 10000 maxSize: 10000
thingDetailRelation: thingDetailRelation:
timeToLiveInMinutes: 1440 timeToLiveInMinutes: 1440
maxSize: 10000 maxSize: 10000
thingRootRelation: thingRootRelation:
timeToLiveInMinutes: 1440 timeToLiveInMinutes: 1440
maxSize: 10000 maxSize: 10000
thingCalcConfig: thingCalcConfig:
timeToLiveInMinutes: 525600 timeToLiveInMinutes: 525600
maxSize: 10000 maxSize: 10000
filterRule: filterRule:
timeToLiveInMinutes: 525600 timeToLiveInMinutes: 525600
maxSize: 10000 maxSize: 10000
alarmRule: alarmRule:
timeToLiveInMinutes: 525600 timeToLiveInMinutes: 525600
maxSize: 1000 maxSize: 1000
alarmRuleEntity: alarmRuleEntity:
timeToLiveInMinutes: 525600 timeToLiveInMinutes: 525600
maxSize: 1000 maxSize: 1000
alarmRuleAction: alarmRuleAction:
timeToLiveInMinutes: 525600 timeToLiveInMinutes: 525600
maxSize: 1000 maxSize: 1000
scriptInfo: scriptInfo:
timeToLiveInMinutes: 525600 timeToLiveInMinutes: 525600
maxSize: 1000 maxSize: 1000
mockDataConfig: mockDataConfig:
timeToLiveInMinutes: 525600 timeToLiveInMinutes: 525600
maxSize: 1000 maxSize: 1000
mockDataLatestTime: mockDataLatestTime:
timeToLiveInMinutes: 525600 timeToLiveInMinutes: 525600
maxSize: 1000 maxSize: 1000
Loading…
Cancel
Save