package com.tang.demo.util;import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringBootConfiguration; @SpringBootConfiguration public class AutoStartProjectInDefaultBrowser implements CommandLineRunner { @Override public void run(String ... args) throws Exception { try { Runtime.getRuntime().exec("cmd /c start http://localhost:8080/login"); } catch (Exception ex) { ex.printStackTrace(); } } }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)