From 1fe82e4b17d8b8095769e2afcf56c9345778e58c Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期三, 04 二月 2026 16:15:53 +0800
Subject: [PATCH] yys  增加日志打印

---
 src/main/java/com/ruoyi/RuoYiApplication.java |   38 ++++++++++++++++++++++++++++----------
 1 files changed, 28 insertions(+), 10 deletions(-)

diff --git a/src/main/java/com/ruoyi/RuoYiApplication.java b/src/main/java/com/ruoyi/RuoYiApplication.java
index e3c56ee..d3b3677 100644
--- a/src/main/java/com/ruoyi/RuoYiApplication.java
+++ b/src/main/java/com/ruoyi/RuoYiApplication.java
@@ -1,8 +1,12 @@
 package com.ruoyi;
 
+import com.ruoyi.api.dto.ApiProperties;
+import org.springframework.boot.CommandLineRunner;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.context.annotation.Bean;
+import org.springframework.scheduling.annotation.EnableScheduling;
 
 /**
  * 鍚姩绋嬪簭
@@ -10,21 +14,35 @@
  * @author ruoyi
  */
 @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
+@EnableScheduling
 public class RuoYiApplication
 {
     public static void main(String[] args)
     {
         // System.setProperty("spring.devtools.restart.enabled", "false");
         SpringApplication.run(RuoYiApplication.class, args);
-        System.out.println("(鈾モ棤鈥库棤)锞夛緸  鑻ヤ緷鍚姩鎴愬姛   醿�(麓凇`醿�)锞�  \n" +
-                " .-------.       ____     __        \n" +
-                " |  _ _   \\      \\   \\   /  /    \n" +
-                " | ( ' )  |       \\  _. /  '       \n" +
-                " |(_ o _) /        _( )_ .'         \n" +
-                " | (_,_).' __  ___(_ o _)'          \n" +
-                " |  |\\ \\  |  ||   |(_,_)'         \n" +
-                " |  | \\ `'   /|   `-'  /           \n" +
-                " |  |  \\    /  \\      /           \n" +
-                " ''-'   `'-'    `-..-'              ");
+        System.out.println("(鈾モ棤鈥库棤)锞夛緸  鑻ヤ緷鍚姩鎴愬姛   醿�(麓凇`醿�)锞�");
+    }
+
+    /**
+     * 椤圭洰鍚姩鍚庢墽琛岋細鎵撳嵃宸ヤ俊灞�閰嶇疆淇℃伅
+     * 閫氳繃 Bean 娉ㄥ叆 ApiProperties锛岀洿鎺ヨ鍙栭厤缃�
+     */
+    @Bean
+    public CommandLineRunner printApiConfig(ApiProperties apiProperties) {
+        return args -> {
+            System.out.println("==================== 姒嗘灄甯傚伐淇″眬鏁版嵁鎺ㄩ�侀厤缃� ====================");
+            System.out.println("鎺ㄩ�両P鍦板潃锛�" + apiProperties.getIp());
+            System.out.println("浼佷笟搴旂敤ID锛�" + apiProperties.getAppid());
+            System.out.println("浼佷笟搴旂敤绉橀挜锛�" + apiProperties.getSecret());
+            System.out.println("浼佷笟鍚嶇О锛�" + apiProperties.getEntName());
+            System.out.println("缁熶竴绀句細淇$敤浠g爜锛�" + apiProperties.getSocialCreditCode());
+            System.out.println("鏃ュ潎鐢ㄧ數閲忥細" + apiProperties.getDayPowerConsumption() + " 搴�");
+            System.out.println("鍗曚綅浜у�煎熀鏁帮細" + apiProperties.getOutputValuesBase() + " 涓囧厓");
+            System.out.println("鏈堢數璐癸細" + apiProperties.getElectricityCost() + " 鍏�");
+            System.out.println("鐧诲綍鎺ㄩ�佸紑鍏筹細" + (apiProperties.getLoginPush() ? "寮�鍚�" : "鍏抽棴"));
+            System.out.println("鐢垫暟鎹帹閫佸紑鍏筹細" + (apiProperties.getPush() ? "寮�鍚�" : "鍏抽棴"));
+            System.out.println("================================================================");
+        };
     }
 }

--
Gitblit v1.9.3