45 lines
2.3 KiB
Java
45 lines
2.3 KiB
Java
package com.ruoyi;
|
|
|
|
import java.net.InetAddress;
|
|
import java.net.UnknownHostException;
|
|
|
|
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.Environment;
|
|
|
|
/**
|
|
* 启动程序
|
|
*
|
|
* @author ruoyi
|
|
*/
|
|
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
|
public class RuoYiApplication {
|
|
public static void main(String[] args) throws UnknownHostException {
|
|
// System.setProperty("spring.devtools.restart.enabled", "false");
|
|
ConfigurableApplicationContext application = SpringApplication.run(RuoYiApplication.class, args);
|
|
System.out.println("(♥◠‿◠)ノ゙ 若依极客启动成功 ლ(´ڡ`ლ)゙ \n" +
|
|
" .-------. ____ __ \n" +
|
|
" | _ _ \\ \\ \\ / / \n" +
|
|
" | ( ' ) | \\ _. / ' \n" +
|
|
" |(_ o _) / _( )_ .' \n" +
|
|
" | (_,_).' __ ___(_ o _)' " + " ____ _ " + "\n" +
|
|
" | |\\ \\ | || |(_,_)' " + " / ___| ___ ___| | __ " + "\n" +
|
|
" | | \\ `' /| `-' / " + "| | _ / _ \\/ _ \\ |/ / " + "\n" +
|
|
" | | \\ / \\ / " + " | |_| | __/ __/ < " + "\n" +
|
|
" ''-' `'-' `-..-' " + "\\____|\\___|\\___|_|\\_\\");
|
|
|
|
Environment env = application.getEnvironment();
|
|
String ip = InetAddress.getLocalHost().getHostAddress();
|
|
String port = env.getProperty("server.port");
|
|
System.out.println("\n----------------------------------------------------------\n\t" +
|
|
"Application Ruoyi-Geek is running! Access URLs:\n\t" +
|
|
"Local: \t\thttp://localhost:" + port + "/\n\t" +
|
|
"External: \thttp://" + ip + ":" + port + "/\n\t" +
|
|
"Swagger文档: \thttp://" + ip + ":" + port + "/swagger-ui/index.html\n\t" +
|
|
"Knife4j文档: \thttp://" + ip + ":" + port + "/doc.html" + "" + "\n" +
|
|
"----------------------------------------------------------");
|
|
}
|
|
}
|