MCPcopy Create free account
hub / github.com/cool-team-official/cool-admin-java / CoolEps

Class CoolEps

src/main/java/com/cool/core/eps/CoolEps.java:38–410  ·  view source on GitHub ↗

实体信息与路径

Source from the content-addressed store, hash-verified

36 * 实体信息与路径
37 */
38@Getter
39@Component
40@Slf4j
41@RequiredArgsConstructor
42public class CoolEps {
43
44 @Value("${server.port}")
45 private int serverPort;
46
47 private Dict entityInfo;
48
49 private Dict menuInfo;
50
51 private JSONObject swaggerInfo;
52
53 @Value("${springdoc.api-docs.enabled:false}")
54 private boolean apiDocsEnabled;
55
56 public Dict admin;
57
58 public Dict app;
59
60 final private RequestMappingHandlerMapping requestMappingHandlerMapping;
61
62 @Async
63 public void init() {
64 if (!apiDocsEnabled) {
65 log.info("服务启动成功,端口:{}", serverPort);
66 return;
67 }
68 entityInfo = Dict.create();
69 menuInfo = Dict.create();
70 swaggerInfo = swaggerInfo();
71 Runnable task = () -> {
72 entity();
73 urls();
74 log.info("初始化eps完成,服务启动成功,端口:{}", serverPort);
75 };
76 // ThreadUtil.safeSleep(3000);
77 ThreadUtil.execute(task);
78 }
79
80 /**
81 * 清空所有的数据
82 */
83 public void clear() {
84 admin = Dict.create();
85 app = Dict.create();
86 }
87
88 /**
89 * 构建所有的url
90 */
91 private void urls() {
92 Dict admin = Dict.create();
93 Dict app = Dict.create();
94 ArrayList<Object> emptyList = new ArrayList<>();
95 Map<RequestMappingInfo, HandlerMethod> map = requestMappingHandlerMapping.getHandlerMethods();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected