ctl+alt+L格式化

main
wenhua.zhou 2 years ago
parent d62480e4c6
commit 1d2b18c5e9

@ -31,6 +31,4 @@ public interface OperationDB {
boolean updateSyncRecordsTable(String tableName, int deviceID, String time);
}

@ -45,5 +45,4 @@ public class FormatUtil {
}
}

@ -35,7 +35,6 @@ public class MqttUtil {
private int qos;
public boolean publish2MQTT(String content) {
MqttClient client;
MqttDeliveryToken token;
@ -108,12 +107,14 @@ public class MqttUtil {
public void connectionLost(Throwable cause) {
log.info("connectionLost:{}", cause.getMessage());
}
public void messageArrived(String topic, MqttMessage message) {
log.info("topic:{} ", topic);
log.info("Qos:{} ", message.getQos());
log.info("{}", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + " message content接收: " + new String(message.getPayload()));
}
public void deliveryComplete(IMqttDeliveryToken token) {
log.info("deliveryComplete---------{}", token.isComplete());
}
@ -121,7 +122,8 @@ public class MqttUtil {
client.connect(options);
client.subscribe(topic, qos);
} catch (Exception e) {
e.printStackTrace(); }
e.printStackTrace();
}
}

Loading…
Cancel
Save