package com.huashe.park.collect.config;

import org.eclipse.paho.client.mqttv3.MqttException;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.huashe.park.collect.core.MqttTemplate;

@Configuration
@ConfigurationProperties(prefix = "aliyun.mqtt")
public class AliyunMqttCfg {
    private String uri;

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    @Bean
    public MqttTemplate mqttTemplate() throws MqttException {
        return new MqttTemplate();
    }
}
