Commit 7ef2a522 authored by KeYong's avatar KeYong

更新

parent 8d83a490
......@@ -96,7 +96,13 @@ public class SupervisionApplication {
* @throws MqttException
*/
@Bean
void initMqtt() throws MqttException
{ emqKeeper.getMqttClient().subscribe(airportTopic, 1, amosMqttListener); }
void initMqtt() {
try {
emqKeeper.getMqttClient().subscribe(airportTopic, 1, amosMqttListener);
} catch (MqttException e) {
e.printStackTrace();
logger.error("EMQ初始化连接失败!");
}
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment