diff --git a/aidex-admin/src/main/java/com/aidex/AiDexApplication.java b/aidex-admin/src/main/java/com/aidex/AiDexApplication.java index c58441749296d0f9f9b5c1806dc234e5048f6d15..1870ba6fe69dae7a68f19c0f3f184dbd9e732e66 100644 --- a/aidex-admin/src/main/java/com/aidex/AiDexApplication.java +++ b/aidex-admin/src/main/java/com/aidex/AiDexApplication.java @@ -1,8 +1,14 @@ package com.aidex; +import org.apache.commons.lang3.StringUtils; 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; + +import java.net.InetAddress; +import java.net.UnknownHostException; /** * 启动程序 @@ -10,20 +16,34 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; * @author ruoyi */ @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) -public class AiDexApplication -{ - public static void main(String[] args) - { - System.setProperty("spring.devtools.restart.enabled", "false"); - SpringApplication.run(AiDexApplication.class, args); - StringBuffer aidex = new StringBuffer("(♥◠‿◠)ノ゙ AiDex启动成功 ლ(´ڡ`ლ)゙ \n"); - aidex.append(" /\\ (_) __ \\ / ____| |\n"); - aidex.append(" / \\ _| | | | _____ __ | (___ | |__ __ _ _ __ _ __\n"); - aidex.append(" / /\\ \\ | | | | |/ _ \\ \\/ / \\___ \\| '_ \\ / _` | '__| '_ \\\n"); - aidex.append(" / ____ \\| | |__| | __/> < ____) | | | | (_| | | | |_) |\n"); - aidex.append("/_/ \\_\\_|_____/ \\___/_/\\_\\ |_____/|_| |_|\\__,_|_| | .__/\n"); - aidex.append(" | |\n"); - aidex.append(" |_|"); - System.out.println(aidex); +public class AiDexApplication { + public static void main(String[] args) throws UnknownHostException { + { + System.setProperty("spring.devtools.restart.enabled", "false"); + ConfigurableApplicationContext application = SpringApplication.run(AiDexApplication.class, args); + StringBuffer aidex = new StringBuffer("(♥◠‿◠)ノ゙ AiDex启动成功 ლ(´ڡ`ლ)゙ \n"); + aidex.append(" /\\ (_) __ \\ / ____| |\n"); + aidex.append(" / \\ _| | | | _____ __ | (___ | |__ __ _ _ __ _ __\n"); + aidex.append(" / /\\ \\ | | | | |/ _ \\ \\/ / \\___ \\| '_ \\ / _` | '__| '_ \\\n"); + aidex.append(" / ____ \\| | |__| | __/> < ____) | | | | (_| | | | |_) |\n"); + aidex.append("/_/ \\_\\_|_____/ \\___/_/\\_\\ |_____/|_| |_|\\__,_|_| | .__/\n"); + aidex.append(" | |\n"); + aidex.append(" |_|"); + + Environment env = application.getEnvironment(); + String ip = InetAddress.getLocalHost().getHostAddress(); + String port = env.getProperty("server.port"); + String path = env.getProperty("server.servlet.context-path"); + if (StringUtils.isEmpty(path)) { + path = ""; + } + + aidex.append("\n----------------------------------------------------------\n\t" + + "Application is running! Access URLs:\n\t" + + "Local访问网址: \t\thttp://localhost:" + port + path + "\n\t" + + "External访问网址: \thttp://" + ip + ":" + port + path + "\n\t" + + "----------------------------------------------------------"); + System.out.println(aidex); + } } -} +} \ No newline at end of file diff --git a/aidex-ui/download.bat b/aidex-ui/download.bat new file mode 100644 index 0000000000000000000000000000000000000000..67301ac04c39aa0087004473727967d3d7c3e019 --- /dev/null +++ b/aidex-ui/download.bat @@ -0,0 +1 @@ +npm install --registry=https://registry.npm.taobao.org \ No newline at end of file diff --git a/aidex-ui/start.bat b/aidex-ui/start.bat new file mode 100644 index 0000000000000000000000000000000000000000..eb1cffdc75ac4504795782e35755699a9fcb4d19 --- /dev/null +++ b/aidex-ui/start.bat @@ -0,0 +1 @@ +npm run serve \ No newline at end of file