mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-03-14 09:52:02 +08:00
update 优化 增加mqtt模块配置开关
This commit is contained in:
@@ -8,6 +8,8 @@ import org.dromara.mica.mqtt.codec.message.MqttPublishMessage;
|
||||
import org.dromara.mica.mqtt.core.annotation.MqttClientSubscribe;
|
||||
import org.dromara.mica.mqtt.core.deserialize.MqttJsonDeserializer;
|
||||
import org.dromara.mica.mqtt.spring.client.MqttClientTemplate;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@@ -30,7 +32,9 @@ import java.nio.charset.StandardCharsets;
|
||||
@Slf4j
|
||||
public class MqttController {
|
||||
|
||||
private final MqttClientTemplate client;
|
||||
@Lazy
|
||||
@Autowired
|
||||
private MqttClientTemplate client;
|
||||
|
||||
@GetMapping("/send")
|
||||
public boolean send() {
|
||||
|
||||
Reference in New Issue
Block a user