package com.tao.listener;

import org.springframework.stereotype.Component;

/**
 * @ClassName StepExecutor
 * @Description TODO 自动打开默认浏览器
 * @Author zhangyuantao
 * @Date 2022/12/12 7:42
 * @Version 1.0
 */
@Component
public class StepExecutor implements Runnable {
    @Override
    public void run() {
        startStreamTask();
    }

    /**
     * 项目启动后自动打开网页
     */
    public void startStreamTask() {
        try {
            System.out.println("=========> 启动成功！请访问：http://localhost:8085");
//            Runtime.getRuntime().exec("cmd /c start http://localhost:8085");
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

}
