feat:【IoT 物联网】gateway 新增本地开发环境配置
This commit is contained in:
parent
40a9242691
commit
d7c57f5023
|
@ -0,0 +1,53 @@
|
||||||
|
server:
|
||||||
|
port: 8090 # IoT 网关服务端口
|
||||||
|
|
||||||
|
--- #################### 消息队列相关 ####################
|
||||||
|
|
||||||
|
# rocketmq 配置项,对应 RocketMQProperties 配置类
|
||||||
|
rocketmq:
|
||||||
|
name-server: 127.0.0.1:9876 # RocketMQ Namesrv
|
||||||
|
|
||||||
|
--- #################### IoT 网关相关配置 ####################
|
||||||
|
|
||||||
|
yudao:
|
||||||
|
iot:
|
||||||
|
# 网关配置
|
||||||
|
gateway:
|
||||||
|
# 设备 RPC 配置
|
||||||
|
rpc:
|
||||||
|
url: http://127.0.0.1:48080 # 主程序 API 地址
|
||||||
|
# 设备 Token 配置
|
||||||
|
token:
|
||||||
|
secret: yudaoIotGatewayTokenSecret123456789 # Token 密钥,至少32位
|
||||||
|
|
||||||
|
# 协议配置
|
||||||
|
protocol:
|
||||||
|
# ====================================
|
||||||
|
# 针对引入的 HTTP 组件的配置
|
||||||
|
# ====================================
|
||||||
|
http:
|
||||||
|
server-port: 8092
|
||||||
|
# ====================================
|
||||||
|
# 针对引入的 EMQX 组件的配置
|
||||||
|
# ====================================
|
||||||
|
emqx:
|
||||||
|
mqtt-host: 127.0.0.1 # MQTT Broker 地址
|
||||||
|
mqtt-port: 1883 # MQTT Broker 端口
|
||||||
|
mqtt-username: admin # MQTT 用户名
|
||||||
|
mqtt-password: public # MQTT 密码
|
||||||
|
auth-port: 8101 # 认证端口
|
||||||
|
|
||||||
|
# 消息总线配置
|
||||||
|
message-bus:
|
||||||
|
type: rocketmq # 本地开发使用 RocketMQ
|
||||||
|
|
||||||
|
--- #################### 日志相关配置 ####################
|
||||||
|
|
||||||
|
# 开发环境日志配置
|
||||||
|
logging:
|
||||||
|
level:
|
||||||
|
# 开发环境详细日志
|
||||||
|
cn.iocoder.yudao.module.iot.gateway.protocol.mqtt: DEBUG
|
||||||
|
cn.iocoder.yudao.module.iot.gateway.protocol.http: DEBUG
|
||||||
|
# MQTT 客户端日志
|
||||||
|
io.vertx.mqtt: DEBUG
|
|
@ -1,17 +1,18 @@
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: iot-gateway-server
|
name: iot-gateway-server
|
||||||
|
profiles:
|
||||||
|
active: local # 默认激活本地开发环境
|
||||||
|
|
||||||
--- #################### 消息队列相关 ####################
|
--- #################### 消息队列相关 ####################
|
||||||
|
|
||||||
# rocketmq 配置项,对应 RocketMQProperties 配置类
|
# rocketmq 配置项,对应 RocketMQProperties 配置类
|
||||||
rocketmq:
|
rocketmq:
|
||||||
name-server: 127.0.0.1:9876 # RocketMQ Namesrv
|
|
||||||
# Producer 配置项
|
# Producer 配置项
|
||||||
producer:
|
producer:
|
||||||
group: ${spring.application.name}_PRODUCER # 生产者分组
|
group: ${spring.application.name}_PRODUCER # 生产者分组
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
--- #################### IoT 网关相关配置 ####################
|
||||||
|
|
||||||
yudao:
|
yudao:
|
||||||
iot:
|
iot:
|
||||||
|
@ -19,12 +20,10 @@ yudao:
|
||||||
gateway:
|
gateway:
|
||||||
# 设备 RPC 配置
|
# 设备 RPC 配置
|
||||||
rpc:
|
rpc:
|
||||||
url: http://127.0.0.1:48080 # 主程序 API 地址
|
|
||||||
connect-timeout: 30s
|
connect-timeout: 30s
|
||||||
read-timeout: 30s
|
read-timeout: 30s
|
||||||
# 设备 Token 配置
|
# 设备 Token 配置
|
||||||
token:
|
token:
|
||||||
secret: 1234567890123456789012345678901
|
|
||||||
expiration: 7d
|
expiration: 7d
|
||||||
|
|
||||||
# 协议配置
|
# 协议配置
|
||||||
|
@ -34,28 +33,34 @@ yudao:
|
||||||
# ====================================
|
# ====================================
|
||||||
http:
|
http:
|
||||||
enabled: true
|
enabled: true
|
||||||
server-port: 8092
|
|
||||||
# ====================================
|
# ====================================
|
||||||
# 针对引入的 EMQX 组件的配置
|
# 针对引入的 EMQX 组件的配置
|
||||||
# ====================================
|
# ====================================
|
||||||
emqx:
|
emqx:
|
||||||
enabled: true
|
enabled: false
|
||||||
mqtt-host: 127.0.0.1
|
|
||||||
mqtt-port: 1883
|
|
||||||
mqtt-username: admin
|
|
||||||
mqtt-password: admin123
|
|
||||||
mqtt-ssl: false
|
mqtt-ssl: false
|
||||||
mqtt-topics:
|
mqtt-topics:
|
||||||
- "/sys/#"
|
- "/sys/#" # 系统主题(设备上报)
|
||||||
auth-port: 8101
|
- "/ota/#" # OTA 升级主题
|
||||||
|
- "/config/#" # 配置主题
|
||||||
|
|
||||||
# 消息总线配置
|
# 消息总线配置
|
||||||
message-bus:
|
message-bus:
|
||||||
type: rocketmq # 消息总线的类型
|
type: rocketmq # 消息总线的类型
|
||||||
|
|
||||||
# 日志配置
|
--- #################### 日志相关配置 ####################
|
||||||
# TODO 芋艿:是不是可以删除
|
|
||||||
|
# 基础日志配置
|
||||||
logging:
|
logging:
|
||||||
|
file:
|
||||||
|
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径
|
||||||
level:
|
level:
|
||||||
cn.iocoder.yudao: INFO
|
# 应用基础日志级别
|
||||||
|
cn.iocoder.yudao.module.iot.gateway: INFO
|
||||||
|
org.springframework.boot: INFO
|
||||||
|
# RocketMQ 日志
|
||||||
|
org.apache.rocketmq: WARN
|
||||||
|
# 根日志级别
|
||||||
root: INFO
|
root: INFO
|
||||||
|
|
||||||
|
debug: false
|
||||||
|
|
Loading…
Reference in New Issue