diff --git a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/config/BeanInitCastle.java b/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/config/BeanInitCastle.java deleted file mode 100644 index fa97f7f..0000000 --- a/modules/i3plus-ext-mes-apiservice/src/main/java/cn/estsh/i3plus/ext/mes/apiservice/config/BeanInitCastle.java +++ /dev/null @@ -1,67 +0,0 @@ -//package cn.estsh.i3plus.ext.mes.apiservice.config; -//import com.alibaba.fastjson.JSONObject; -//import lombok.Data; -//import lombok.extern.slf4j.Slf4j; -//import org.apache.commons.collections4.list.UnmodifiableList; -//import org.springframework.beans.BeansException; -//import org.springframework.beans.factory.config.BeanPostProcessor; -//import org.springframework.boot.CommandLineRunner; -//import org.springframework.stereotype.Component; -// -//import java.util.*; -// -//@Component -//@Slf4j -//public class BeanInitCastle implements BeanPostProcessor, CommandLineRunner { -// private final Map stats = new HashMap<>(); -// private final List metrics = new ArrayList<>(); -// -// @Data -// public static class Metric { -// public Metric(String name, Integer value) { -// this.name = name; -// this.value = value; -// this.createDate = new Date(); -// } -// -// private String name; -// private Integer value; -// private Date createDate; -// } -// -// @Override -// public void run(String... args) { -// /** -// * 启动完成之后打印时间 -// */ -// List metrics = getMetrics(); -// log.info(JSONObject.toJSONString(metrics)); -// } -// -// public List getMetrics() { -// metrics.sort((o1, o2) -> { -// try { -// return o2.getValue() - o1.getValue(); -// } catch (Exception e) { -// return 0; -// } -// }); -// log.info("metrics {}", JSONObject.toJSONString(metrics)); -// return UnmodifiableList.unmodifiableList(metrics); -// } -// -// @Override -// public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { -// stats.put(beanName, System.currentTimeMillis()); -// return bean; -// } -// -// @Override -// public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { -// Long start = stats.get(beanName); -// if (start != null) { -// metrics.add(new Metric(beanName, Math.toIntExact(System.currentTimeMillis() - start))); -// } -// return bean; -// } -//} \ No newline at end of file