|
@@ -38,7 +38,9 @@ import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
+import org.springframework.boot.context.event.ApplicationReadyEvent;
|
|
|
import org.springframework.context.annotation.ComponentScan;
|
|
|
+import org.springframework.context.event.EventListener;
|
|
|
|
|
|
@SpringBootApplication
|
|
|
@ComponentScan("org.apache.dolphinscheduler")
|
|
@@ -68,8 +70,8 @@ public class AlertServer implements Closeable {
|
|
|
SpringApplication.run(AlertServer.class, args);
|
|
|
}
|
|
|
|
|
|
- @PostConstruct
|
|
|
- public void start() {
|
|
|
+ @EventListener
|
|
|
+ public void start(ApplicationReadyEvent readyEvent) {
|
|
|
logger.info("Starting Alert server");
|
|
|
|
|
|
checkTable();
|