- 更新 application-dev.yml 和 application-prod.yml,添加 MQTT 相关配置 - 重构 MqttConfig 类,优化 MQTT 消息处理流程 - 修改 DeviceController 中的 recordData 方法,使用分页查询 - 更新 RecordData 实体类,使用 JsonbTypeHandler 处理 content 字段 - 重构 RecordDataService接口,简化方法列表 - 新增 RecordDataServiceImpl 类,实现记录数据保存逻辑 - 删除未使用的 UploadDataSocketProcessor 类
54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
server:
|
|
port: 8081
|
|
|
|
mybatis-plus:
|
|
type-aliases-package: com.zsc.edu.gateway.modules.*.entity
|
|
mapper-locations: classpath:mappers/*/*.xml
|
|
type-handlers-package: com.zsc.edu.gateway.framework.mybatisplus
|
|
configuration:
|
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
|
|
|
spring:
|
|
datasource:
|
|
url: jdbc:postgresql://localhost:5432/gateway?ssl=false&TimeZone=Asia/Shanghai
|
|
username: postgres
|
|
password: 123456
|
|
driver-class-name: org.postgresql.Driver
|
|
servlet:
|
|
multipart:
|
|
max-file-size: 40MB
|
|
max-request-size: 40MB
|
|
mail:
|
|
# 配置 SMTP 服务器地址
|
|
host: smtp.qq.com
|
|
# 发送者邮箱
|
|
username: 2179732328@qq.com
|
|
# 配置密码,注意不是真正的密码,而是刚刚申请到的授权码
|
|
password: mabpnbtqqezjdjde
|
|
# 端口号465或587
|
|
port: 587
|
|
# 默认的邮件编码为UTF-8
|
|
default-encoding: UTF-8
|
|
# 配置SSL 加密工厂
|
|
properties:
|
|
mail:
|
|
smtp:
|
|
socketFactoryClass: javax.net.ssl.SSLSocketFactory
|
|
#表示开启 DEBUG 模式,这样,邮件发送过程的日志会在控制台打印出来,方便排查错误
|
|
debug: true
|
|
storage:
|
|
attachment: ./storage/attachment
|
|
temp: ./storage/temp
|
|
|
|
gatherer:
|
|
version: 1.0.0
|
|
|
|
mqtt:
|
|
username: you_mqtt_username
|
|
password: you_mqtt_password
|
|
host: tcp://8.134.67.99
|
|
port: 1883
|
|
topic: test/topic
|
|
qos: 0
|
|
|