123456789101112131415161718192021222324252627 |
- //package com.hfln.device.application.controller;
- //
- //
- //import cn.hfln.framework.mqtt.annotation.MqttSubscribe;
- //import cn.hfln.framework.mqtt.template.MqttTemplate;
- //import cn.hfln.framework.catchlog.CatchAndLog;
- //import cn.hfln.framework.dto.ApiResult;
- //import lombok.extern.slf4j.Slf4j;
- //import org.springframework.beans.factory.annotation.Autowired;
- //import org.springframework.web.bind.annotation.GetMapping;
- //import org.springframework.web.bind.annotation.RestController;
- //
- //@RestController
- //@Slf4j
- //@CatchAndLog
- //public class TestController {
- //
- // @Autowired
- // private MqttTemplate mqttTemplate;
- //
- // @GetMapping("/demo")
- // public ApiResult<Boolean> get() {
- // String topic = "my/1/topic";
- // mqttTemplate.send(topic,"test message");
- // return ApiResult.success(true);
- // }
- //}
|