TestController.java 839 B

123456789101112131415161718192021222324252627
  1. //package com.hfln.device.application.controller;
  2. //
  3. //
  4. //import cn.hfln.framework.mqtt.annotation.MqttSubscribe;
  5. //import cn.hfln.framework.mqtt.template.MqttTemplate;
  6. //import cn.hfln.framework.catchlog.CatchAndLog;
  7. //import cn.hfln.framework.dto.ApiResult;
  8. //import lombok.extern.slf4j.Slf4j;
  9. //import org.springframework.beans.factory.annotation.Autowired;
  10. //import org.springframework.web.bind.annotation.GetMapping;
  11. //import org.springframework.web.bind.annotation.RestController;
  12. //
  13. //@RestController
  14. //@Slf4j
  15. //@CatchAndLog
  16. //public class TestController {
  17. //
  18. // @Autowired
  19. // private MqttTemplate mqttTemplate;
  20. //
  21. // @GetMapping("/demo")
  22. // public ApiResult<Boolean> get() {
  23. // String topic = "my/1/topic";
  24. // mqttTemplate.send(topic,"test message");
  25. // return ApiResult.success(true);
  26. // }
  27. //}