feat: 2.0.0
1. 添加启动logo
This commit is contained in:
parent
e79000e552
commit
b348ba0b0a
@ -1,11 +1,15 @@
|
||||
package com.aizuda.easy.retry.client.core.init;
|
||||
|
||||
import com.aizuda.easy.retry.client.core.Lifecycle;
|
||||
import com.aizuda.easy.retry.common.core.constant.SystemConstants;
|
||||
import com.aizuda.easy.retry.common.core.util.EasyRetryVersion;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.helpers.MessageFormatter;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.boot.ConfigurableBootstrapContext;
|
||||
import org.springframework.boot.SpringApplicationRunListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
@ -25,8 +29,11 @@ public class EasyRetryStartListener implements ApplicationRunner {
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
System.out.println(MessageFormatter.format(SystemConstants.LOGO, EasyRetryVersion.getVersion()).getMessage());
|
||||
|
||||
log.info("Easy-Retry client is preparing to start... v{}", EasyRetryVersion.getVersion());
|
||||
lifecycleList.forEach(Lifecycle::start);
|
||||
log.info("Easy-Retry client started successfully v{}", EasyRetryVersion.getVersion());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -66,4 +66,10 @@ public interface SystemConstants {
|
||||
|
||||
}
|
||||
|
||||
String LOGO = " ___ ___ _ \n" +
|
||||
" | __|__ _ ____ _ | _ \\___| |_ _ _ _ _ \n" +
|
||||
" | _|/ _` (_-< || | | / -_) _| '_| || |\n" +
|
||||
" |___\\__,_/__/\\_, | |_|_\\___|\\__|_| \\_, |\n" +
|
||||
" |__/ |__/ \n" +
|
||||
" :: Easy Retry :: (v{}) \n";
|
||||
}
|
||||
|
@ -1,15 +1,18 @@
|
||||
package com.aizuda.easy.retry.server.support.listener;
|
||||
|
||||
import com.aizuda.easy.retry.common.core.constant.SystemConstants;
|
||||
import com.aizuda.easy.retry.common.core.log.LogUtils;
|
||||
import com.aizuda.easy.retry.common.core.util.EasyRetryVersion;
|
||||
import com.aizuda.easy.retry.server.support.Lifecycle;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.helpers.MessageFormatter;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.event.ContextRefreshedEvent;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -27,6 +30,7 @@ public class StartListener implements ApplicationListener<ContextRefreshedEvent>
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(ContextRefreshedEvent event) {
|
||||
System.out.println(MessageFormatter.format(SystemConstants.LOGO, EasyRetryVersion.getVersion()).getMessage());
|
||||
LogUtils.info(log, "easy-retry-server v{} starting...", EasyRetryVersion.getVersion());
|
||||
lifecycleList.forEach(Lifecycle::start);
|
||||
LogUtils.info(log, "easy-retry-server v{} start completed", EasyRetryVersion.getVersion());
|
||||
|
@ -45,9 +45,9 @@ easy-retry:
|
||||
limiter: 10 # 一个客户端每秒最多接收的重试数量指令
|
||||
step: 100 # 号段模式下步长配置
|
||||
log-storage: 90 # 日志保存时间(单位: day)
|
||||
callback:
|
||||
max-count: 288
|
||||
trigger-interval: 900
|
||||
callback: # 回调配置
|
||||
max-count: 288 #回调最大执行次数
|
||||
trigger-interval: 900 #间隔时间
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user