public static void main(String[] args) {
        ApplicationConfig application = new ApplicationConfig().setAppName("test-server");

        ServerConfig serverConfig = new ServerConfig()
            .setPort(22000)
            .setDaemon(false);

        ProviderConfig<HelloService> providerConfig = new ProviderConfig<HelloService>()
            .setInterfaceId(HelloService.class.getName())
            .setApplication(application)
            .setRef(new HelloServiceImpl())
            .setServer(serverConfig)
            .setRegister(false);

        ProviderConfig<EchoService> providerConfig2 = new ProviderConfig<EchoService>()
            .setInterfaceId(EchoService.class.getName())
            .setApplication(application)
            .setRef(new EchoServiceImpl())
            .setServer(serverConfig)
            .setRegister(false);

        providerConfig.export();
        providerConfig2.export();

        ServerConfig restServer = new ServerConfig()
            .setProtocol("rest")
            .setPort(8888)
            .setDaemon(false);

        ProviderConfig<SwaggerRestService> restProviderConfig = new ProviderConfig<SwaggerRestService>()
            .setInterfaceId(SwaggerRestService.class.getName())
            .setApplication(application)
            .setRef(new SwaggerRestServiceImpl())
            .setBootstrap("rest")
            .setServer(restServer)
            .setRegister(false);

        restProviderConfig.export();

        LOGGER.warn("started at pid {}", RpcRuntimeContext.PID);
    }
@author <a href=mailto:orezsilence@163.com>zhangchengxi</a>
example/src/test/java/com/alipay/sofa/rpc/bolt/start/BoltServerMainWithSwagger.java