本文整理汇总了Java中com.alibaba.dubbo.config.ModuleConfig类的典型用法代码示例。如果您正苦于以下问题:Java ModuleConfig类的具体用法?Java ModuleConfig怎么用?Java ModuleConfig使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ModuleConfig类属于com.alibaba.dubbo.config包,在下文中一共展示了ModuleConfig类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import com.alibaba.dubbo.config.ModuleConfig; //导入依赖的package包/类
public void init() {
//对标签中名字为application的进行解析,这里dubbo使用了统一的DubboBeanDefinitionParser进行解析。
//DubboBeanDefinitionParser实现了BeanDefinitionParser接口,实现parse方法对标签进行解析。
//将解析之后的标签变成Spring中的一个Bean对象。
//application对应一个ApplicationConfig。
//在执行完init方法之后,spring会得到所有的下面这个10个handler
registerBeanDefinitionParser("application", new DubboBeanDefinitionParser(ApplicationConfig.class, true));
registerBeanDefinitionParser("module", new DubboBeanDefinitionParser(ModuleConfig.class, true));
registerBeanDefinitionParser("registry", new DubboBeanDefinitionParser(RegistryConfig.class, true));
registerBeanDefinitionParser("monitor", new DubboBeanDefinitionParser(MonitorConfig.class, true));
registerBeanDefinitionParser("provider", new DubboBeanDefinitionParser(ProviderConfig.class, true));
registerBeanDefinitionParser("consumer", new DubboBeanDefinitionParser(ConsumerConfig.class, true));
registerBeanDefinitionParser("protocol", new DubboBeanDefinitionParser(ProtocolConfig.class, true));
registerBeanDefinitionParser("service", new DubboBeanDefinitionParser(ServiceBean.class, true));
registerBeanDefinitionParser("reference", new DubboBeanDefinitionParser(ReferenceBean.class, false));
registerBeanDefinitionParser("annotation", new DubboBeanDefinitionParser(AnnotationBean.class, true));
}
示例2: init
import com.alibaba.dubbo.config.ModuleConfig; //导入依赖的package包/类
public void init() {
registerBeanDefinitionParser("application", new DubboBeanDefinitionParser(ApplicationConfig.class, true));
registerBeanDefinitionParser("module", new DubboBeanDefinitionParser(ModuleConfig.class, true));
registerBeanDefinitionParser("registry", new DubboBeanDefinitionParser(RegistryConfig.class, true));
registerBeanDefinitionParser("monitor", new DubboBeanDefinitionParser(MonitorConfig.class, true));
registerBeanDefinitionParser("provider", new DubboBeanDefinitionParser(ProviderConfig.class, true));
registerBeanDefinitionParser("consumer", new DubboBeanDefinitionParser(ConsumerConfig.class, true));
registerBeanDefinitionParser("protocol", new DubboBeanDefinitionParser(ProtocolConfig.class, true));
registerBeanDefinitionParser("service", new DubboBeanDefinitionParser(ServiceBean.class, true));
registerBeanDefinitionParser("reference", new DubboBeanDefinitionParser(ReferenceBean.class, false));
registerBeanDefinitionParser("annotation", new DubboBeanDefinitionParser(AnnotationBean.class, true));
}
示例3: configAndBuild
import com.alibaba.dubbo.config.ModuleConfig; //导入依赖的package包/类
public ReferenceBean configAndBuild(Reference reference, Class<?> interfaceClass) throws Exception {
ReferenceBean referenceBean = new ReferenceBean(reference);
referenceBean.setApplication(findBean(reference.application(), ApplicationConfig.class));
referenceBean.setRegistries(findBean(reference.registry(), RegistryConfig.class));
referenceBean.setModule(findBean(reference.module(), ModuleConfig.class));
referenceBean.setApplicationContext(applicationContext);
referenceBean.setInterface(interfaceClass);
referenceBean.afterPropertiesSet();
return referenceBean;
}
示例4: init
import com.alibaba.dubbo.config.ModuleConfig; //导入依赖的package包/类
public void init() {
registerBeanDefinitionParser("application", new DubboBeanDefinitionParser(ApplicationConfig.class, true));
registerBeanDefinitionParser("module", new DubboBeanDefinitionParser(ModuleConfig.class, true));
registerBeanDefinitionParser("registry", new DubboBeanDefinitionParser(RegistryConfig.class, true));
registerBeanDefinitionParser("monitor", new DubboBeanDefinitionParser(MonitorConfig.class, true));
registerBeanDefinitionParser("provider", new DubboBeanDefinitionParser(ProviderConfig.class, true));
registerBeanDefinitionParser("consumer", new DubboBeanDefinitionParser(ConsumerConfig.class, true));
registerBeanDefinitionParser("protocol", new DubboBeanDefinitionParser(ProtocolConfig.class, true));
registerBeanDefinitionParser("service", new DubboBeanDefinitionParser(ServiceBean.class, true));
registerBeanDefinitionParser("reference", new DubboBeanDefinitionParser(ReferenceBean.class, false));
// 注意这里是<dubbo:annotation package="com.package.to.be.scanned" />的解析
registerBeanDefinitionParser("annotation", new DubboBeanDefinitionParser(AnnotationBean.class, true));
}
示例5: DubboProperties
import com.alibaba.dubbo.config.ModuleConfig; //导入依赖的package包/类
public DubboProperties() {
log.info("-----初始化dubbo默认配置信息------");
protocol = new ProtocolConfig("dubbo");
protocol.setSerialization("hessian2");
registry = new RegistryConfig("zookeeper://127.0.0.1:2181");
provider = new ProviderConfig();
module = new ModuleConfig();
monitor = new MonitorConfig();
}
示例6: init
import com.alibaba.dubbo.config.ModuleConfig; //导入依赖的package包/类
public void init() {
registerBeanDefinitionParser("application", new DubboBeanDefinitionParser(ApplicationConfig.class, true));
registerBeanDefinitionParser("module", new DubboBeanDefinitionParser(ModuleConfig.class, true));
registerBeanDefinitionParser("registry", new DubboBeanDefinitionParser(RegistryConfig.class, true));
registerBeanDefinitionParser("monitor", new DubboBeanDefinitionParser(MonitorConfig.class, true));
registerBeanDefinitionParser("provider", new DubboBeanDefinitionParser(ProviderConfig.class, true));
registerBeanDefinitionParser("consumer", new DubboBeanDefinitionParser(ConsumerConfig.class, true));
registerBeanDefinitionParser("protocol", new DubboBeanDefinitionParser(ProtocolConfig.class, true));
registerBeanDefinitionParser("service", new DubboBeanDefinitionParser(ServiceBean.class, true));
registerBeanDefinitionParser("reference", new DubboBeanDefinitionParser(ReferenceBean.class, false));
registerBeanDefinitionParser("annotation", new DubboBeanDefinitionParser(AnnotationBean.class, true));
}
示例7: getModule
import com.alibaba.dubbo.config.ModuleConfig; //导入依赖的package包/类
public ModuleConfig getModule() {
return module;
}
示例8: setModule
import com.alibaba.dubbo.config.ModuleConfig; //导入依赖的package包/类
public void setModule(ModuleConfig module) {
this.module = module;
}