diff --git a/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/EasyRetryServerApplication.java b/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/EasyRetryServerApplication.java index 2dd75f28..85afa361 100644 --- a/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/EasyRetryServerApplication.java +++ b/easy-retry-server/src/main/java/com/aizuda/easy/retry/server/EasyRetryServerApplication.java @@ -1,6 +1,7 @@ package com.aizuda.easy.retry.server; import com.aizuda.easy.retry.server.server.NettyHttpServer; +import lombok.extern.slf4j.Slf4j; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; @@ -18,6 +19,7 @@ import java.util.concurrent.TimeUnit; @SpringBootApplication @EnableTransactionManagement(proxyTargetClass = true) +@Slf4j public class EasyRetryServerApplication { @Bean @@ -39,11 +41,13 @@ public class EasyRetryServerApplication { // 最长自旋10秒,保证nettyHttpServer启动完成 int waitCount = 0; while (!nettyHttpServer.isStarted() || waitCount > 100) { + log.info("--------> easy-retry netty server is staring...."); TimeUnit.MILLISECONDS.sleep(100); waitCount++; } if (!nettyHttpServer.isStarted()) { + log.error("--------> easy-retry netty server startup failure."); // Netty启动失败,停止Web服务和Spring Boot应用程序 serverFactory.getWebServer().stop(); SpringApplication.exit(SpringApplication.run(EasyRetryServerApplication.class));