All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.foreveross.springboot.dubbo.commands.DubboxServiceLatchCommandLineRunner Maven / Gradle / Ivy

There is a newer version: 2.3.8
Show newest version
package com.foreveross.springboot.dubbo.commands;

import com.foreveross.springboot.dubbo.lifecycle.ShutdownLatch;
import org.springframework.boot.CommandLineRunner;

/**
 * 获取命令行参数方式,应用启动就hook线程。
 */
public class DubboxServiceLatchCommandLineRunner implements CommandLineRunner {

    private String domain = "com.foreveross.lifecycles"; // default

    @Override
    public void run(String... args) throws Exception {
//        ShutdownLatch latch = new ShutdownLatch(getDomain());
//        latch.await();
        System.out.println("run run run...");
    }


    public String getDomain() {
        return domain;
    }

    public void setDomain(String domain) {
        this.domain = domain;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy