加入logo打印

This commit is contained in:
bryan.zhang
2018-02-12 16:53:32 +08:00
parent 1bd9c5c6cd
commit 2fcfccadcc
3 changed files with 29 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ import com.thebeastshop.liteflow.exception.FlowSystemException;
import com.thebeastshop.liteflow.exception.NoAvailableSlotException;
import com.thebeastshop.liteflow.flow.FlowBus;
import com.thebeastshop.liteflow.parser.FlowParser;
import com.thebeastshop.liteflow.util.LOGOPrinter;
public class FlowExecutor {

View File

@@ -19,6 +19,7 @@ import org.springframework.core.Ordered;
import org.springframework.core.PriorityOrdered;
import com.thebeastshop.liteflow.core.NodeComponent;
import com.thebeastshop.liteflow.entity.config.Node;
import com.thebeastshop.liteflow.util.LOGOPrinter;
public class ComponentScaner implements BeanPostProcessor, PriorityOrdered {
@@ -26,6 +27,10 @@ public class ComponentScaner implements BeanPostProcessor, PriorityOrdered {
public static Map<String, NodeComponent> nodeComponentMap = new HashMap<String, NodeComponent>();
static {
LOGOPrinter.print();
}
@Override
public int getOrder() {
return Ordered.LOWEST_PRECEDENCE;

View File

@@ -0,0 +1,23 @@
package com.thebeastshop.liteflow.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class LOGOPrinter {
private static final Logger LOG = LoggerFactory.getLogger(LOGOPrinter.class);
public static void print() {
StringBuilder str = new StringBuilder("\n");
str.append("================================================================================================\n");
str.append(" _ ___ _____ _____ _____ _ _____ __\n");
str.append(" | | |_ _|_ _| ____| | ___| | / _ \\ \\ / /\n");
str.append(" | | | | | | | _| _____| |_ | | | | | \\ \\ /\\ / / \n");
str.append(" | |___ | | | | | |__|_____| _| | |__| |_| |\\ V V / \n");
str.append(" |_____|___| |_| |_____| |_| |_____\\___/ \\_/\\_/ \n\n");
str.append(" 做最轻量级,最吊炸天的微流程框架\n");
str.append(" To be the most lightweight and the most practical micro-process framework\n");
str.append("================================================================================================\n");
LOG.info(str.toString());
}
}