package com.nanjing.water.common.config;
|
|
import lombok.Data;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.core.annotation.Order;
|
import org.springframework.stereotype.Component;
|
|
@Data
|
@Component
|
@ConfigurationProperties(prefix = "mqtt")
|
@Order(10)
|
public class MqttConfig {
|
/**
|
* 是否启用
|
*/
|
private Boolean enable;
|
/**
|
* 主机
|
*/
|
private String host;
|
|
/**
|
* 端口
|
*/
|
private Integer port;
|
|
/**
|
* 用户名
|
*/
|
private String user;
|
|
/**
|
* 密码
|
*/
|
private String password;
|
|
/**
|
* 订阅主题
|
*/
|
private String topic;
|
|
/**
|
* 订阅消息的客户端id
|
*/
|
private String clientId;
|
|
/**
|
* 连接超时时间
|
*/
|
private Integer connectionTimeout;
|
|
/**
|
* 心跳
|
*/
|
private Integer keepAliveInterval;
|
|
/**
|
* 发送消息的客户端id
|
*/
|
private String serverClientId;
|
}
|