Files
mqtt-xfcpj/system/mqtt-xf-receiver/src/main/resources/application.yml
2026-02-05 18:01:33 +08:00

130 lines
4.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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 日志