當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。