class AnnotationRpcServerDemo {

    public static void main(String[] args) throws InterruptedException {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext(new
                String[]{"classpath*:motan_demo_server_annotation.xml"});
        MotanSwitcherUtil.setSwitcherValue(MotanConstants.REGISTRY_HEARTBEAT_SWITCHER, true);
        System.out.println("server start...");

    }


    @Bean(name="demoMotan")
    public ProtocolConfigBean protocolConfig1() {
        ProtocolConfigBean config = new ProtocolConfigBean();
        config.setDefault(true);
        config.setName("motan");
        config.setMaxContentLength(1048576);
        return config;
    }

    @Bean(name = "motan")
    public ProtocolConfigBean protocolConfig2() {
        ProtocolConfigBean config = new ProtocolConfigBean();
//        config.setId("demoMotan2");
        config.setName("motan");
        config.setMaxContentLength(1048576);
        return config;
    }

    @Bean(name="registryConfig1")
    public RegistryConfigBean registryConfig() {<FILL_FUNCTION_BODY>}


    @Bean(name="proxy_reg")
    public RegistryConfigBean registryProxyConfig() {
        RegistryConfigBean config = new RegistryConfigBean();
        config.setRegProtocol("weibomesh");
        config.setProxyRegistryId("registryConfig1");
        return config;
    }



    @Bean
    public BasicServiceConfigBean baseServiceConfig() {
        BasicServiceConfigBean config = new BasicServiceConfigBean();
        config.setExport("demoMotan:8002");
        config.setGroup("motan-demo-rpc");
        config.setAccessLog(false);
        config.setShareChannel(true);
        config.setModule("motan-demo-rpc");
        config.setApplication("myMotanDemo");
        config.setRegistry("registryConfig1");
        return config;
    }

}

        RegistryConfigBean config = new RegistryConfigBean();
//        config.setRegProtocol("zk");
//        config.setAddress("127.0.0.1:2181");
        config.setRegProtocol("local");
        return config;
    
<no_super_class>