| 1234567891011121314151617181920212223242526272829303132333435363738 |
- package com.ruoyi;
- import org.springframework.boot.SpringApplication;
- import org.springframework.boot.autoconfigure.SpringBootApplication;
- import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
- import org.springframework.context.ConfigurableApplicationContext;
- import org.springframework.core.env.ConfigurableEnvironment;
- import java.util.TimeZone;
- /**
- * 启动程序
- *
- * @author ruoyi
- */
- @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
- public class RuoYiApplication
- {
- public static void main(String[] args)
- {
- // System.setProperty("spring.devtools.restart.enabled", "false");
- ConfigurableApplicationContext context = SpringApplication.run(RuoYiApplication.class, args);
- ConfigurableEnvironment environment = context.getEnvironment();
- String port = environment.getProperty("spring.port");
- String active = environment.getProperty("spring.profiles.active");
- String timeZone = TimeZone.getDefault().getID();
- System.out.println(
- "==================================\n" +
- " \n" +
- " 【中台系统】启动成功 \n" +
- " 时区:" + timeZone + " \n" +
- " 端口:" + port + " \n" +
- " 环境:" + active + " \n" +
- " \n" +
- "==================================\n"
- );
- }
- }
|