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(); } } }
springboot 运行项目自动跳转页面
最新推荐文章于 2024-07-01 20:00:05 发布