mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-03 19:38:20 +08:00
优化corn表达式解析失败后退出无任何日志提示问题
This commit is contained in:
@@ -80,10 +80,9 @@ public abstract class AbstractScheduledTask<E extends Comparable> implements Sch
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGGER.error("modify scheduledCron failed, format invalid, scheduledName:{} scheduledCron:{}."
|
LOGGER.error("modify scheduledCron failed, format invalid, scheduledName:{} scheduledCron:{}.", scheduledName, scheduledCron);
|
||||||
, scheduledName, scheduledCron);
|
|
||||||
if (existIfIllegal) {
|
if (existIfIllegal) {
|
||||||
System.exit(0);
|
throw new UnsupportedOperationException(String.format("scheduledName:%s scheduledCron:%s format invalid", scheduledName, scheduledCron));
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package com.xiaojukeji.kafka.manager.web;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.web.servlet.ServletComponentScan;
|
import org.springframework.boot.web.servlet.ServletComponentScan;
|
||||||
import org.springframework.scheduling.annotation.EnableAsync;
|
import org.springframework.scheduling.annotation.EnableAsync;
|
||||||
@@ -17,7 +16,6 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
|||||||
@EnableAsync
|
@EnableAsync
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
@ServletComponentScan
|
@ServletComponentScan
|
||||||
@EnableAutoConfiguration
|
|
||||||
@SpringBootApplication(scanBasePackages = {"com.xiaojukeji.kafka.manager"})
|
@SpringBootApplication(scanBasePackages = {"com.xiaojukeji.kafka.manager"})
|
||||||
public class MainApplication {
|
public class MainApplication {
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(MainApplication.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(MainApplication.class);
|
||||||
@@ -28,7 +26,8 @@ public class MainApplication {
|
|||||||
sa.run(args);
|
sa.run(args);
|
||||||
LOGGER.info("MainApplication started");
|
LOGGER.info("MainApplication started");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
LOGGER.error("start failed and application exit", e);
|
||||||
|
System.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user