RUOYI-geek/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java

45 lines
2.3 KiB
Java
Raw Normal View History

2023-10-16 03:40:13 +00:00
package com.ruoyi;
2023-12-12 08:52:05 +00:00
import java.net.InetAddress;
import java.net.UnknownHostException;
2023-10-16 03:40:13 +00:00
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
2023-12-12 08:52:05 +00:00
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;
2023-10-16 03:40:13 +00:00
/**
* 启动程序
*
* @author ruoyi
*/
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
2023-12-12 08:52:05 +00:00
public class RuoYiApplication {
public static void main(String[] args) throws UnknownHostException {
2023-10-16 03:40:13 +00:00
// System.setProperty("spring.devtools.restart.enabled", "false");
2023-12-12 08:52:05 +00:00
ConfigurableApplicationContext application = SpringApplication.run(RuoYiApplication.class, args);
2024-04-21 18:30:15 +00:00
System.out.println("(♥◠‿◠)ノ゙ 若依极客启动成功 ლ(´ڡ`ლ)゙ \n" +
2023-10-16 03:40:13 +00:00
" .-------. ____ __ \n" +
" | _ _ \\ \\ \\ / / \n" +
" | ( ' ) | \\ _. / ' \n" +
" |(_ o _) / _( )_ .' \n" +
2024-04-21 18:30:15 +00:00
" | (_,_).' __ ___(_ o _)' " + " ____ _ " + "\n" +
" | |\\ \\ | || |(_,_)' " + " / ___| ___ ___| | __ " + "\n" +
" | | \\ `' /| `-' / " + "| | _ / _ \\/ _ \\ |/ / " + "\n" +
" | | \\ / \\ / " + " | |_| | __/ __/ < " + "\n" +
" ''-' `'-' `-..-' " + "\\____|\\___|\\___|_|\\_\\");
2023-12-12 08:52:05 +00:00
Environment env = application.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port");
2024-04-24 17:24:51 +00:00
System.out.println("\n----------------------------------------------------------\n" +
" Application Ruoyi-Geek is running! Access URLs:\n" +
" Local: http://localhost:" + port + "/\n" +
" External: http://" + ip + ":" + port + "/\n" +
" Swagger文档: http://" + ip + ":" + port + "/swagger-ui/index.html\n" +
" Knife4j文档: http://" + ip + ":" + port + "/doc.html" + "" + "\n" +
2023-12-12 08:52:05 +00:00
"----------------------------------------------------------");
2023-10-16 03:40:13 +00:00
}
}