| | |
| | | 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;
|
| | |
|
| | | /**
|
| | | * 启动程序
|
| | | *
|
| | | * @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("推送IP地址:" + apiProperties.getIp());
|
| | | System.out.println("企业应用ID:" + apiProperties.getAppid());
|
| | | System.out.println("企业应用秘钥:" + apiProperties.getSecret());
|
| | | System.out.println("企业名称:" + apiProperties.getEntName());
|
| | | System.out.println("统一社会信用代码:" + 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("================================================================");
|
| | | };
|
| | | }
|
| | | }
|