完善dtu调试

This commit is contained in:
fjcydl
2022-06-28 17:01:20 +08:00
parent 4bfafd5f93
commit 5b3101f896
2 changed files with 3 additions and 2 deletions
@@ -5,6 +5,7 @@ import com.iteaj.framework.result.Result;
import com.iteaj.iboot.msn.iot.service.IDeviceService;
import com.iteaj.iot.client.mqtt.impl.DefaultMqttComponent;
import io.netty.handler.codec.mqtt.MqttQoS;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -19,7 +20,7 @@ public class DeviceDebugController extends BaseController {
private final IDeviceService deviceService;
private final DefaultMqttComponent component;
public DeviceDebugController(DefaultMqttComponent component, IDeviceService deviceService) {
public DeviceDebugController(@Autowired(required = false) DefaultMqttComponent component, IDeviceService deviceService) {
this.component = component;
this.deviceService = deviceService;
}
@@ -6,7 +6,7 @@ import io.netty.handler.codec.mqtt.MqttQoS;
import io.netty.handler.codec.mqtt.MqttTopicSubscription;
import org.springframework.stereotype.Component;
@Component
//@Component
public class MqttDebugSubscribeListener implements MqttSubscribeListener {
private MqttTopicSubscription subscription = new MqttTopicSubscription("iot/debug/#", MqttQoS.AT_MOST_ONCE);