本文整理匯總了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;
}
示例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;
}
示例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;
}
示例4: isEligibleAdvisorBean
@Override
protected boolean isEligibleAdvisorBean(String beanName) {
return (this.beanFactory.containsBeanDefinition(beanName) &&
this.beanFactory.getBeanDefinition(beanName).getRole() == BeanDefinition.ROLE_INFRASTRUCTURE);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例9: topicHandlerAnnotationProcessor
@SuppressWarnings("rawtypes")
@Bean(name = TankMessageServiceConfigUtils.TOPIC_HANDLER_ANNOTATION_PROCESSOR_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public TopicMessageHandlerBeanPostProcessor topicHandlerAnnotationProcessor() {
return new TopicMessageHandlerBeanPostProcessor();
}
示例10: durationCapableStringValueResolver
@Bean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
@Order(Ordered.HIGHEST_PRECEDENCE)
public StringValueResolver durationCapableStringValueResolver() {
return SchedulingUtils.prepScheduledAnnotationBeanPostProcessor(applicationContext);
}
示例11: scheduledAnnotationProcessor
@Bean(name=AnnotationConfigUtils.SCHEDULED_ANNOTATION_PROCESSOR_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public ScheduledAnnotationBeanPostProcessor scheduledAnnotationProcessor() {
return new ScheduledAnnotationBeanPostProcessor();
}
示例12: transactionAttributeSource
@Bean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public TransactionAttributeSource transactionAttributeSource() {
return new AnnotationTransactionAttributeSource();
}
示例13: cacheOperationSource
@Bean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public CacheOperationSource cacheOperationSource() {
return new AnnotationCacheOperationSource();
}
示例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)));
}