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