springboot项目启动后跳到指定页面

只需要在main启动类下添加两行代码,即可调用windows 功能

//启动后跳转到指定页
String url = "http://127.0.0.1:8001";
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + url);
posted @ 2022-01-11 23:14  得好好活  阅读(558)  评论(0)    收藏  举报