You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
637 B
Java

2 years ago
package com.xydl.util;
import com.xydl.service.impl.MqttServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.text.SimpleDateFormat;
import java.util.Date;
public class Subscribe {
private static final Logger logger = LoggerFactory.getLogger(MqttServiceImpl.class);
2 years ago
2 years ago
private static Subscribe single = new Subscribe();
private Subscribe(){
logger.info("开始订阅===subScribe执行一次==={}", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
2 years ago
new MqttUtil().subScribeMQTT();
2 years ago
}
public static Subscribe getInstance(){
return single;
}
}