* 启动provider

dubbo-demo-api-provider

* 启动consumer

dubbo-demo-api-consumer

consumer设置generic

```java
    public static void main(String[] args) {
        ReferenceConfig<DemoService> reference = new ReferenceConfig<>();
        reference.setApplication(new ApplicationConfig("dubbo-demo-api-consumer"));
        reference.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181"));
        reference.setInterface(DemoService.class);
        reference.setGeneric(true);
        
        Object obj = reference.get();
        for(Class c : obj.getClass().getInterfaces()) {
            System.err.println(c);
        }
        DemoService service = reference.get();
        String message = service.sayHello("dubbo");
        System.out.println(message);
    }
```

客户端会报错：

```
Exception in thread "main" java.lang.ClassCastException: org.apache.dubbo.common.bytecode.proxy0 cannot be cast to org.apache.dubbo.demo.DemoService
	at org.apache.dubbo.demo.consumer.Application.main(Application.java:42)
```
String MERGER_KEY = "merger";
    String IS_SERVER_KEY = "isserver";
    String FORCE_USE_TAG = "dubbo.force.tag";
    String TPS_LIMIT_RATE_KEY = "tps";
    String TPS_LIMIT_INTERVAL_KEY = "tps.interval";
    long DEFAULT_TPS_LIMIT_INTERVAL = 60 * 1000;
    String AUTO_ATTACH_INVOCATIONID_KEY = "invocationid.autoattach";
    boolean DEFAULT_STUB_EVENT = false;
    String STUB_EVENT_METHODS_KEY = "dubbo.stub.event.methods";
    String PROXY_KEY = "proxy";
    String EXECUTES_KEY = "executes";
    String ACCESS_LOG_KEY = "accesslog";
    String ACTIVES_KEY = "actives";
    String ID_KEY = "id";
    String ASYNC_KEY = "async";
    String RETURN_KEY = "return";
    String TOKEN_KEY = "token";
    String INTERFACES = "interfaces";
    String GENERIC_KEY = "generic";
    String LOCAL_PROTOCOL = "injvm";
    String DEFAULT_REMOTING_SERVER = "netty";
    String SCOPE_KEY = "scope";
    String SCOPE_LOCAL = "local";
    String SCOPE_REMOTE = "remote";
    String INPUT_KEY = "input";
    String OUTPUT_KEY = "output";
    String CONSUMER_MODEL = "consumerModel";
    String METHOD_MODEL = "methodModel";
}