|
|
|
@ -4,14 +4,17 @@ package com.hxjt.dataupload.mqtt; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.context.annotation.DependsOn; |
|
|
|
import org.springframework.context.annotation.Lazy; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
@Component |
|
|
|
@ConfigurationProperties("spring.mqtt") |
|
|
|
|
|
|
|
@DependsOn("mqttCallback") |
|
|
|
public class MqttConfig { |
|
|
|
@Autowired |
|
|
|
@Lazy |
|
|
|
private com.hxjt.dataupload.mqtt.MqttClient mqttClient; |
|
|
|
|
|
|
|
private String username; |
|
|
|
|