130 lines
4.4 KiB
YAML
130 lines
4.4 KiB
YAML
|
|
server:
|
|||
|
|
port: 30013
|
|||
|
|
|
|||
|
|
spring:
|
|||
|
|
application:
|
|||
|
|
name: mica-mqtt-server
|
|||
|
|
# 环境 dev|test|prod
|
|||
|
|
profiles:
|
|||
|
|
active: dev
|
|||
|
|
# active: prod
|
|||
|
|
messages:
|
|||
|
|
encoding: UTF-8
|
|||
|
|
basename: i18n/messages
|
|||
|
|
# jackson时间格式化
|
|||
|
|
jackson:
|
|||
|
|
time-zone: GMT+8
|
|||
|
|
date-format: yyyy-MM-dd HH:mm:ss
|
|||
|
|
mvc:
|
|||
|
|
pathmatch:
|
|||
|
|
matching-strategy: ANT_PATH_MATCHER
|
|||
|
|
servlet:
|
|||
|
|
multipart:
|
|||
|
|
max-file-size: 100MB
|
|||
|
|
max-request-size: 100MB
|
|||
|
|
enabled: true
|
|||
|
|
|
|||
|
|
#mybatis
|
|||
|
|
#mybatis-plus:
|
|||
|
|
# mapper-locations: classpath*:/mapper/**/*.xml
|
|||
|
|
# #实体扫描,多个package用逗号或者分号分隔
|
|||
|
|
# typeAliasesPackage: io.renren.entity
|
|||
|
|
# global-config:
|
|||
|
|
# #数据库相关配置
|
|||
|
|
# db-config:
|
|||
|
|
# #主键类型
|
|||
|
|
# id-type: ASSIGN_ID
|
|||
|
|
# banner: false
|
|||
|
|
# #原生配置
|
|||
|
|
# configuration:
|
|||
|
|
# map-underscore-to-camel-case: true
|
|||
|
|
# cache-enabled: false
|
|||
|
|
# call-setters-on-nulls: true
|
|||
|
|
# jdbc-type-for-null: 'null'
|
|||
|
|
# configuration-properties:
|
|||
|
|
# prefix:
|
|||
|
|
# blobType: BLOB
|
|||
|
|
# boolValue: TRUE
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
# mqtt 服务端配置
|
|||
|
|
mqtt:
|
|||
|
|
server:
|
|||
|
|
enabled: true # 是否开启服务端,默认:true
|
|||
|
|
name: Mica-Mqtt-Server # 名称,默认:Mica-Mqtt-Server
|
|||
|
|
heartbeat-timeout: 120000 # 心跳超时,单位毫秒,默认: 1000 * 120
|
|||
|
|
read-buffer-size: 8KB # 接收数据的 buffer size,默认:8k
|
|||
|
|
max-bytes-in-message: 10MB # 消息解析最大 bytes 长度,默认:10M
|
|||
|
|
auth:
|
|||
|
|
enable: true # 是否开启 mqtt 认证
|
|||
|
|
username: admin # mqtt 认证用户名
|
|||
|
|
password: admin@123 # mqtt 认证密码
|
|||
|
|
debug: true # 如果开启 prometheus 指标收集建议关闭
|
|||
|
|
stat-enable: true # 开启指标收集,debug 和 prometheus 开启时需要打开,默认开启,关闭节省内存
|
|||
|
|
mqtt-listener: # mqtt 监听器
|
|||
|
|
enable: true # 是否开启,默认:false
|
|||
|
|
# ip: "0.0.0.0" # 服务端 ip 默认为空,0.0.0.0,建议不要设置
|
|||
|
|
port: 1883 # 端口,默认:1883
|
|||
|
|
mqtt-ssl-listener: # mqtt ssl 监听器
|
|||
|
|
enable: false # 是否开启,默认:false
|
|||
|
|
port: 8883 # 端口,默认:8883
|
|||
|
|
ssl: # ssl 配置,必须
|
|||
|
|
keystore-path: # 必须参数:ssl keystore 目录,支持 classpath:/ 路径。
|
|||
|
|
keystore-pass: # 必选参数:ssl keystore 密码
|
|||
|
|
truststore-path: # 可选参数:ssl 双向认证 truststore 目录,支持 classpath:/ 路径。
|
|||
|
|
truststore-pass: # 可选参数:ssl 双向认证 truststore 密码
|
|||
|
|
client-auth: none # 是否需要客户端认证(双向认证),默认:NONE(不需要)
|
|||
|
|
ws-listener: # websocket mqtt 监听器
|
|||
|
|
enable: true # 是否开启,默认:false
|
|||
|
|
port: 8083 # websocket 端口,默认:8083
|
|||
|
|
wss-listener: # websocket ssl mqtt 监听器
|
|||
|
|
enable: false # 是否开启,默认:false
|
|||
|
|
port: 8084 # 端口,默认:8084
|
|||
|
|
ssl: # ssl 配置,必须
|
|||
|
|
keystore-path: # 必须参数:ssl keystore 目录,支持 classpath:/ 路径。
|
|||
|
|
keystore-pass: # 必选参数:ssl keystore 密码
|
|||
|
|
truststore-path: # 可选参数:ssl 双向认证 truststore 目录,支持 classpath:/ 路径。
|
|||
|
|
truststore-pass: # 可选参数:ssl 双向认证 truststore 密码
|
|||
|
|
client-auth: none # 是否需要客户端认证(双向认证),默认:NONE(不需要)
|
|||
|
|
http-listener:
|
|||
|
|
enable: true
|
|||
|
|
port: 18083
|
|||
|
|
basic-auth: # 基础认证
|
|||
|
|
enable: true
|
|||
|
|
username: mica
|
|||
|
|
password: mica
|
|||
|
|
mcp-server: # 大模型 mcp
|
|||
|
|
enable: true
|
|||
|
|
|
|||
|
|
springdoc:
|
|||
|
|
swagger-ui:
|
|||
|
|
urls:
|
|||
|
|
- name: swagger
|
|||
|
|
url: /v3/api-docs
|
|||
|
|
|
|||
|
|
# actuator management
|
|||
|
|
management:
|
|||
|
|
info:
|
|||
|
|
defaults:
|
|||
|
|
enabled: true
|
|||
|
|
metrics:
|
|||
|
|
tags:
|
|||
|
|
application: ${spring.application.name}
|
|||
|
|
endpoint:
|
|||
|
|
health:
|
|||
|
|
show-details: ALWAYS
|
|||
|
|
prometheus:
|
|||
|
|
enabled: true
|
|||
|
|
endpoints:
|
|||
|
|
web:
|
|||
|
|
exposure:
|
|||
|
|
include: '*'
|
|||
|
|
|
|||
|
|
logging:
|
|||
|
|
level:
|
|||
|
|
root: info
|
|||
|
|
server: info # t-io 服务端默认日志
|
|||
|
|
org.tio: info # t-io 服务端默认日志
|
|||
|
|
org.dromara.mica.mqtt: info # mica-mqtt 日志
|