class AnnotationRpcClientDemo {

    public static void main(String[] args) throws InterruptedException {

        ApplicationContext ctx = new ClassPathXmlApplicationContext(new
                String[]{"classpath:motan_demo_client_annotation.xml"});


        DemoRpcHandler handler = (DemoRpcHandler) ctx.getBean("demoRpcHandler");
        handler.test();


        System.out.println("motan demo is finish.");
        System.exit(0);
    }


    @Bean(name = "demoMotan")
    public ProtocolConfigBean demoMotanProtocolConfig() {
        ProtocolConfigBean config = new ProtocolConfigBean();
        //Id无需设置
//        config.setId("demoMotan");
        config.setName("motan");
        config.setDefault(true);
        config.setMaxContentLength(1048576);
        config.setHaStrategy("failover");
        config.setLoadbalance("roundrobin");
        return config;
    }

    @Bean(name = "demoMotan2")
    public ProtocolConfigBean protocolConfig2() {
        ProtocolConfigBean config = new ProtocolConfigBean();
        config.setName("motan");
        config.setMaxContentLength(1048576);
        config.setHaStrategy("failover");
        config.setLoadbalance("roundrobin");
        return config;
    }

    @Bean(name = "registry")
    public RegistryConfigBean registryConfig() {
        RegistryConfigBean config = new RegistryConfigBean();
//        config.setRegProtocol("zk");
//        config.setAddress("127.0.0.1:2181");
        config.setRegProtocol("direct");
        config.setAddress("127.0.0.1:8002");
        return config;
    }


    @Bean(name = "motantestClientBasicConfig")
    public BasicRefererConfigBean baseRefererConfig() {<FILL_FUNCTION_BODY>}

}

        BasicRefererConfigBean config = new BasicRefererConfigBean();
        config.setProtocol("demoMotan");
        config.setGroup("motan-demo-rpc");
        config.setModule("motan-demo-rpc");
        config.setApplication("myMotanDemo");
        config.setRegistry("registry");
        config.setCheck(false);
        config.setAccessLog(true);
        config.setRetries(2);
        config.setThrowException(true);
        return config;
    
<no_super_class>