I may be stupid

This commit is contained in:
2025-12-29 20:32:35 +01:00
parent c725455594
commit ce63e20da0

View File

@@ -1,9 +1,9 @@
package be.naaturel.boardmateapi;
import be.naaturel.boardmateapi.common.helpers.Logger;
import be.naaturel.boardmateapi.services.MqttService;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.PreDestroy;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.annotation.Bean;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;
import java.util.Arrays;
@@ -17,9 +17,10 @@ public class MqttStarter {
this.service = service;
}
@Bean
@PostConstruct
public void start(){
try {
Logger.displayInfo("Broker initialized");
setCallback();
service.subscribe("/board-mate/+/telemetry");
} catch (Exception e){