本文整理汇总了Java中com.alibaba.dubbo.config.spring.AnnotationBean类的典型用法代码示例。如果您正苦于以下问题:Java AnnotationBean类的具体用法?Java AnnotationBean怎么用?Java AnnotationBean使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AnnotationBean类属于com.alibaba.dubbo.config.spring包,在下文中一共展示了AnnotationBean类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: init
import com.alibaba.dubbo.config.spring.AnnotationBean; //导入依赖的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));
}
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:18,代码来源:DubboNamespaceHandler.java
示例2: annotationBean
import com.alibaba.dubbo.config.spring.AnnotationBean; //导入依赖的package包/类
/**
* 启动dubbo
*
* @return
*/
@Bean
public AnnotationBean annotationBean() {
AnnotationBean bean = new AnnotationBean();
bean.setPackage("com.bubble2");
return bean;
}
开发者ID:swxiao,项目名称:bubble2,代码行数:12,代码来源:DubboAnnotationConfiguration.java
示例3: init
import com.alibaba.dubbo.config.spring.AnnotationBean; //导入依赖的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));
}
开发者ID:zhuxiaolei,项目名称:dubbo2,代码行数:13,代码来源:DubboNamespaceHandler.java
示例4: annotationBean
import com.alibaba.dubbo.config.spring.AnnotationBean; //导入依赖的package包/类
/**
* 启动motan
*
* @return
*/
@Bean
public AnnotationBean annotationBean() {
AnnotationBean bean = new AnnotationBean();
bean.setPackage("com.bubble2");
return bean;
}
开发者ID:swxiao,项目名称:bubble2,代码行数:12,代码来源:DubboClientAnnotaionConfiguration.java
示例5: init
import com.alibaba.dubbo.config.spring.AnnotationBean; //导入依赖的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));
registerBeanDefinitionParser("mockSystemUrl", new DubboBeanDefinitionParser(MockSystemUrlConfig.class, true));
}
开发者ID:flychao88,项目名称:dubbocloud,代码行数:14,代码来源:DubboNamespaceHandler.java
示例6: initialize
import com.alibaba.dubbo.config.spring.AnnotationBean; //导入依赖的package包/类
@Override
public void initialize(ConfigurableApplicationContext applicationContext) {
Environment env = applicationContext.getEnvironment();
String scan = env.getProperty("spring.dubbo.scan");
if (scan != null) {
AnnotationBean scanner = BeanUtils.instantiate(AnnotationBean.class);
scanner.setPackage(scan);
scanner.setApplicationContext(applicationContext);
applicationContext.addBeanFactoryPostProcessor(scanner);
applicationContext.getBeanFactory().addBeanPostProcessor(scanner);
applicationContext.getBeanFactory().registerSingleton("annotationBean", scanner);
}
}
开发者ID:javahongxi,项目名称:whatsmars,代码行数:15,代码来源:DubboConfigurationApplicationContextInitializer.java
示例7: init
import com.alibaba.dubbo.config.spring.AnnotationBean; //导入依赖的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));
}
开发者ID:yuexiahandao,项目名称:DubboCode,代码行数:14,代码来源:DubboNamespaceHandler.java
示例8: init
import com.alibaba.dubbo.config.spring.AnnotationBean; //导入依赖的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));
}
开发者ID:hufeng,项目名称:dubbo2.js,代码行数:13,代码来源:DubboNamespaceHandler.java
注:本文中的com.alibaba.dubbo.config.spring.AnnotationBean类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论