【代码重构】重构项目启动时,打印相关文档代码
This commit is contained in:
parent
0bbc682ba4
commit
c793d7e5c5
|
@ -1,11 +1,16 @@
|
|||
package cn.iocoder.yudao.framework.banner.core;
|
||||
|
||||
import cn.hutool.core.map.MapBuilder;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
|
@ -15,6 +20,35 @@ import java.util.concurrent.TimeUnit;
|
|||
*/
|
||||
@Slf4j
|
||||
public class BannerApplicationRunner implements ApplicationRunner {
|
||||
private static final Map<String,String> MODULE_MAP = MapBuilder.create(new TreeMap<String,String>())
|
||||
// 数据报表
|
||||
.put("cn.iocoder.yudao.module.report.framework.security.config.SecurityConfiguration",
|
||||
"[报表模块 yudao-module-report - 已禁用][参考 https://doc.iocoder.cn/report/ 开启]")
|
||||
// 工作流
|
||||
.put("cn.iocoder.yudao.module.bpm.framework.flowable.config.BpmFlowableConfiguration",
|
||||
"[工作流模块 yudao-module-bpm - 已禁用][参考 https://doc.iocoder.cn/bpm/ 开启]")
|
||||
// 商城系统
|
||||
.put("cn.iocoder.yudao.module.trade.framework.web.config.TradeWebConfiguration",
|
||||
"[商城系统 yudao-module-mall - 已禁用][参考 https://doc.iocoder.cn/mall/build/ 开启]")
|
||||
// ERP 系统
|
||||
.put("cn.iocoder.yudao.module.erp.framework.web.config.ErpWebConfiguration",
|
||||
"[ERP 系统 yudao-module-erp - 已禁用][参考 https://doc.iocoder.cn/erp/build/ 开启]")
|
||||
// CRM 系统
|
||||
.put("cn.iocoder.yudao.module.crm.framework.web.config.CrmWebConfiguration",
|
||||
"[CRM 系统 yudao-module-crm - 已禁用][参考 https://doc.iocoder.cn/crm/build/ 开启]")
|
||||
// 微信公众号
|
||||
.put("cn.iocoder.yudao.module.mp.framework.mp.config.MpConfiguration",
|
||||
"[微信公众号 yudao-module-mp - 已禁用][参考 https://doc.iocoder.cn/mp/build/ 开启]")
|
||||
// 支付平台
|
||||
.put("cn.iocoder.yudao.module.pay.framework.pay.config.PayConfiguration",
|
||||
"[支付系统 yudao-module-pay - 已禁用][参考 https://doc.iocoder.cn/pay/build/ 开启]")
|
||||
// AI 大模型
|
||||
.put("cn.iocoder.yudao.module.ai.framework.web.config.AiWebConfiguration",
|
||||
"[AI 大模型 yudao-module-ai - 已禁用][参考 https://doc.iocoder.cn/ai/build/ 开启]")
|
||||
// IOT 物联网
|
||||
.put("cn.iocoder.yudao.module.iot.framework.web.config.IotWebConfiguration",
|
||||
"[IOT 物联网 yudao-module-iot - 已禁用][参考 https://doc.iocoder.cn/iot/build/ 开启]")
|
||||
.build();
|
||||
|
||||
@Override
|
||||
public void run(ApplicationArguments args) {
|
||||
|
@ -30,41 +64,10 @@ public class BannerApplicationRunner implements ApplicationRunner {
|
|||
"https://doc.iocoder.cn",
|
||||
"https://t.zsxq.com/02Yf6M7Qn");
|
||||
|
||||
// 数据报表
|
||||
if (isNotPresent("cn.iocoder.yudao.module.report.framework.security.config.SecurityConfiguration")) {
|
||||
System.out.println("[报表模块 yudao-module-report - 已禁用][参考 https://doc.iocoder.cn/report/ 开启]");
|
||||
}
|
||||
// 工作流
|
||||
if (isNotPresent("cn.iocoder.yudao.module.bpm.framework.flowable.config.BpmFlowableConfiguration")) {
|
||||
System.out.println("[工作流模块 yudao-module-bpm - 已禁用][参考 https://doc.iocoder.cn/bpm/ 开启]");
|
||||
}
|
||||
// 商城系统
|
||||
if (isNotPresent("cn.iocoder.yudao.module.trade.framework.web.config.TradeWebConfiguration")) {
|
||||
System.out.println("[商城系统 yudao-module-mall - 已禁用][参考 https://doc.iocoder.cn/mall/build/ 开启]");
|
||||
}
|
||||
// ERP 系统
|
||||
if (isNotPresent("cn.iocoder.yudao.module.erp.framework.web.config.ErpWebConfiguration")) {
|
||||
System.out.println("[ERP 系统 yudao-module-erp - 已禁用][参考 https://doc.iocoder.cn/erp/build/ 开启]");
|
||||
}
|
||||
// CRM 系统
|
||||
if (isNotPresent("cn.iocoder.yudao.module.crm.framework.web.config.CrmWebConfiguration")) {
|
||||
System.out.println("[CRM 系统 yudao-module-crm - 已禁用][参考 https://doc.iocoder.cn/crm/build/ 开启]");
|
||||
}
|
||||
// 微信公众号
|
||||
if (isNotPresent("cn.iocoder.yudao.module.mp.framework.mp.config.MpConfiguration")) {
|
||||
System.out.println("[微信公众号 yudao-module-mp - 已禁用][参考 https://doc.iocoder.cn/mp/build/ 开启]");
|
||||
}
|
||||
// 支付平台
|
||||
if (isNotPresent("cn.iocoder.yudao.module.pay.framework.pay.config.PayConfiguration")) {
|
||||
System.out.println("[支付系统 yudao-module-pay - 已禁用][参考 https://doc.iocoder.cn/pay/build/ 开启]");
|
||||
}
|
||||
// AI 大模型
|
||||
if (isNotPresent("cn.iocoder.yudao.module.ai.framework.web.config.AiWebConfiguration")) {
|
||||
System.out.println("[AI 大模型 yudao-module-ai - 已禁用][参考 https://doc.iocoder.cn/ai/build/ 开启]");
|
||||
}
|
||||
// IOT 物联网
|
||||
if (isNotPresent("cn.iocoder.yudao.module.iot.framework.web.config.IotWebConfiguration")) {
|
||||
System.out.println("[IOT 物联网 yudao-module-iot - 已禁用][参考 https://doc.iocoder.cn/iot/build/ 开启]");
|
||||
for (Map.Entry<String, String> entry : MODULE_MAP.entrySet()) {
|
||||
if (isNotPresent(entry.getKey())){
|
||||
System.out.println(entry.getValue());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue