After springboot starts, access the default road directly

After springboot starts, access the default road directly

@Configuration
	public class IndexConfig {
    
    
		@EventListener({
    
     ApplicationReadyEvent.class })
		void applicationReadyEvent() {
    
    
			System.out.println("正在为您启动应用...");
			String url = "http://localhost:8080/UpAndDown/index";
			Runtime runtime = Runtime.getRuntime();
			try {
    
    
				runtime.exec("rundll32 url.dll,FileProtocolHandler " + url);
			} catch (IOException e) {
    
    
				e.printStackTrace();
			}
		}
	}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324354525&siteId=291194637