当前位置: 首页>>代码示例>>Java>>正文


Java BeanDefinition.ROLE_INFRASTRUCTURE属性代码示例

本文整理汇总了Java中org.springframework.beans.factory.config.BeanDefinition.ROLE_INFRASTRUCTURE属性的典型用法代码示例。如果您正苦于以下问题:Java BeanDefinition.ROLE_INFRASTRUCTURE属性的具体用法?Java BeanDefinition.ROLE_INFRASTRUCTURE怎么用?Java BeanDefinition.ROLE_INFRASTRUCTURE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.springframework.beans.factory.config.BeanDefinition的用法示例。


在下文中一共展示了BeanDefinition.ROLE_INFRASTRUCTURE属性的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: asyncAdvisor

@Bean(name=AnnotationConfigUtils.ASYNC_ANNOTATION_PROCESSOR_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public AsyncAnnotationBeanPostProcessor asyncAdvisor() {
	Assert.notNull(this.enableAsync, "@EnableAsync annotation metadata was not injected");
	AsyncAnnotationBeanPostProcessor bpp = new AsyncAnnotationBeanPostProcessor();
	Class<? extends Annotation> customAsyncAnnotation = enableAsync.getClass("annotation");
	if (customAsyncAnnotation != AnnotationUtils.getDefaultValue(EnableAsync.class, "annotation")) {
		bpp.setAsyncAnnotationType(customAsyncAnnotation);
	}
	if (this.executor != null) {
		bpp.setExecutor(this.executor);
	}
	bpp.setProxyTargetClass(this.enableAsync.getBoolean("proxyTargetClass"));
	bpp.setOrder(this.enableAsync.<Integer>getNumber("order"));
	return bpp;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:16,代码来源:ProxyAsyncConfiguration.java

示例2: jetcacheAdvisor

@Bean(name = CacheAdvisor.CACHE_ADVISOR_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public CacheAdvisor jetcacheAdvisor() {
    ConcurrentHashMap configMap = new ConcurrentHashMap();

    JetCacheInterceptor jetCacheInterceptor = new JetCacheInterceptor();
    jetCacheInterceptor.setCacheConfigMap(configMap);
    jetCacheInterceptor.setApplicationContext(applicationContext);

    CacheAdvisor advisor = new CacheAdvisor();
    advisor.setAdviceBeanName(CacheAdvisor.CACHE_ADVISOR_BEAN_NAME);
    advisor.setAdvice(jetCacheInterceptor);
    advisor.setBasePackages(this.enableMethodCache.getStringArray("basePackages"));
    advisor.setCacheConfigMap(configMap);
    advisor.setOrder(this.enableMethodCache.<Integer>getNumber("order"));
    return advisor;
}
 
开发者ID:alibaba,项目名称:jetcache,代码行数:17,代码来源:JetCacheProxyConfiguration.java

示例3: mbeanExporter

@Bean(name=MBEAN_EXPORTER_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public AnnotationMBeanExporter mbeanExporter() {
	AnnotationMBeanExporter exporter = new AnnotationMBeanExporter();
	setupDomain(exporter);
	setupServer(exporter);
	setupRegistrationPolicy(exporter);
	return exporter;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:MBeanExportConfiguration.java

示例4: isEligibleAdvisorBean

@Override
protected boolean isEligibleAdvisorBean(String beanName) {
	return (this.beanFactory.containsBeanDefinition(beanName) &&
			this.beanFactory.getBeanDefinition(beanName).getRole() == BeanDefinition.ROLE_INFRASTRUCTURE);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:InfrastructureAdvisorAutoProxyCreator.java

示例5: transactionAdvisor

@Bean(name=TransactionManagementConfigUtils.TRANSACTION_ADVISOR_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public BeanFactoryTransactionAttributeSourceAdvisor transactionAdvisor() {
	BeanFactoryTransactionAttributeSourceAdvisor advisor = new BeanFactoryTransactionAttributeSourceAdvisor();
	advisor.setTransactionAttributeSource(transactionAttributeSource());
	advisor.setAdvice(transactionInterceptor());
	advisor.setOrder(this.enableTx.<Integer>getNumber("order"));
	return advisor;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:ProxyTransactionManagementConfiguration.java

示例6: transactionInterceptor

@Bean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public TransactionInterceptor transactionInterceptor() {
	TransactionInterceptor interceptor = new TransactionInterceptor();
	interceptor.setTransactionAttributeSource(transactionAttributeSource());
	if (this.txManager != null) {
		interceptor.setTransactionManager(this.txManager);
	}
	return interceptor;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:10,代码来源:ProxyTransactionManagementConfiguration.java

示例7: cacheAdvisor

@Bean(name=AnnotationConfigUtils.CACHE_ADVISOR_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public BeanFactoryCacheOperationSourceAdvisor cacheAdvisor() {
	BeanFactoryCacheOperationSourceAdvisor advisor =
		new BeanFactoryCacheOperationSourceAdvisor();
	advisor.setCacheOperationSource(cacheOperationSource());
	advisor.setAdvice(cacheInterceptor());
	advisor.setOrder(this.enableCaching.<Integer>getNumber("order"));
	return advisor;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:10,代码来源:ProxyCachingConfiguration.java

示例8: cacheInterceptor

@Bean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public CacheInterceptor cacheInterceptor() {
	CacheInterceptor interceptor = new CacheInterceptor();
	interceptor.setCacheOperationSources(cacheOperationSource());
	if (this.cacheManager != null) {
		interceptor.setCacheManager(this.cacheManager);
	}
	if (this.keyGenerator != null) {
		interceptor.setKeyGenerator(this.keyGenerator);
	}
	return interceptor;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:13,代码来源:ProxyCachingConfiguration.java

示例9: topicHandlerAnnotationProcessor

@SuppressWarnings("rawtypes")
@Bean(name = TankMessageServiceConfigUtils.TOPIC_HANDLER_ANNOTATION_PROCESSOR_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public TopicMessageHandlerBeanPostProcessor topicHandlerAnnotationProcessor() {
    return new TopicMessageHandlerBeanPostProcessor();
}
 
开发者ID:ailang323,项目名称:tankms,代码行数:6,代码来源:TankMessageServiceBootstrapConfiguration.java

示例10: durationCapableStringValueResolver

@Bean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
@Order(Ordered.HIGHEST_PRECEDENCE)
public StringValueResolver durationCapableStringValueResolver() {
    return SchedulingUtils.prepScheduledAnnotationBeanPostProcessor(applicationContext);
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:6,代码来源:CasCoreUtilConfiguration.java

示例11: scheduledAnnotationProcessor

@Bean(name=AnnotationConfigUtils.SCHEDULED_ANNOTATION_PROCESSOR_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public ScheduledAnnotationBeanPostProcessor scheduledAnnotationProcessor() {
	return new ScheduledAnnotationBeanPostProcessor();
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:SchedulingConfiguration.java

示例12: transactionAttributeSource

@Bean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public TransactionAttributeSource transactionAttributeSource() {
	return new AnnotationTransactionAttributeSource();
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:ProxyTransactionManagementConfiguration.java

示例13: cacheOperationSource

@Bean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public CacheOperationSource cacheOperationSource() {
	return new AnnotationCacheOperationSource();
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:5,代码来源:ProxyCachingConfiguration.java

示例14: isBeanEligible

/**
 * Determine whether the specified bean  is eligible for inclusion in the
 * LiveBeansView JSON snapshot.
 * @param beanName the name of the bean
 * @param bd the corresponding bean definition
 * @param bf the containing bean factory
 * @return {@code true} if the bean is to be included; {@code false} otherwise
 */
protected boolean isBeanEligible(String beanName, BeanDefinition bd, ConfigurableBeanFactory bf) {
	return (bd.getRole() != BeanDefinition.ROLE_INFRASTRUCTURE &&
			(!bd.isLazyInit() || bf.containsSingleton(beanName)));
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:12,代码来源:LiveBeansView.java


注:本文中的org.springframework.beans.factory.config.BeanDefinition.ROLE_INFRASTRUCTURE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。