|
@@ -0,0 +1,43 @@
|
|
|
+package com.jjt.utils;
|
|
|
+
|
|
|
+import com.jjt.biz.service.IApiService;
|
|
|
+import com.jjt.calc.service.ITwinCalcHourService;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.core.env.Environment;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import javax.annotation.PostConstruct;
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 初始化启动处理
|
|
|
+ *
|
|
|
+ * @author wukai
|
|
|
+ * @date 2024/5/4 20:35
|
|
|
+ */
|
|
|
+@Service
|
|
|
+@Slf4j
|
|
|
+public class InitService {
|
|
|
+ @Resource
|
|
|
+ private IApiService apiService;
|
|
|
+ @Resource
|
|
|
+ private ITwinCalcHourService twinCalcHourService;
|
|
|
+ @Resource
|
|
|
+ private Environment env;
|
|
|
+
|
|
|
+ @PostConstruct
|
|
|
+ public void init() {
|
|
|
+// String[] activeProfiles = env.getActiveProfiles();
|
|
|
+// System.err.println("================");
|
|
|
+// System.err.println("================");
|
|
|
+// System.err.println("================");
|
|
|
+// System.err.println("================");
|
|
|
+// System.err.println("================");
|
|
|
+// for (String profile : activeProfiles) {
|
|
|
+// System.err.println("Active Profile: " + profile);
|
|
|
+// }
|
|
|
+ twinCalcHourService.calc2Curr();
|
|
|
+ apiService.curr();
|
|
|
+ apiService.today();
|
|
|
+ }
|
|
|
+}
|