Search in sources :

Example 21 with Role

use of org.springframework.context.annotation.Role in project spring-framework by spring-projects.

the class ProxyJCacheConfiguration method cacheInterceptor.

@Bean(name = "jCacheInterceptor")
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public JCacheInterceptor cacheInterceptor(JCacheOperationSource jCacheOperationSource) {
    JCacheInterceptor interceptor = new JCacheInterceptor(this.errorHandler);
    interceptor.setCacheOperationSource(jCacheOperationSource);
    return interceptor;
}
Also used : JCacheInterceptor(org.springframework.cache.jcache.interceptor.JCacheInterceptor) Role(org.springframework.context.annotation.Role) Bean(org.springframework.context.annotation.Bean)

Example 22 with Role

use of org.springframework.context.annotation.Role in project spring-framework by spring-projects.

the class ProxyJCacheConfiguration method cacheAdvisor.

@Bean(name = CacheManagementConfigUtils.JCACHE_ADVISOR_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public BeanFactoryJCacheOperationSourceAdvisor cacheAdvisor(JCacheOperationSource jCacheOperationSource, JCacheInterceptor jCacheInterceptor) {
    BeanFactoryJCacheOperationSourceAdvisor advisor = new BeanFactoryJCacheOperationSourceAdvisor();
    advisor.setCacheOperationSource(jCacheOperationSource);
    advisor.setAdvice(jCacheInterceptor);
    if (this.enableCaching != null) {
        advisor.setOrder(this.enableCaching.<Integer>getNumber("order"));
    }
    return advisor;
}
Also used : BeanFactoryJCacheOperationSourceAdvisor(org.springframework.cache.jcache.interceptor.BeanFactoryJCacheOperationSourceAdvisor) Role(org.springframework.context.annotation.Role) Bean(org.springframework.context.annotation.Bean)

Example 23 with Role

use of org.springframework.context.annotation.Role in project spring-framework by spring-projects.

the class ProxyTransactionManagementConfiguration method transactionAdvisor.

@Bean(name = TransactionManagementConfigUtils.TRANSACTION_ADVISOR_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public BeanFactoryTransactionAttributeSourceAdvisor transactionAdvisor(TransactionAttributeSource transactionAttributeSource, TransactionInterceptor transactionInterceptor) {
    BeanFactoryTransactionAttributeSourceAdvisor advisor = new BeanFactoryTransactionAttributeSourceAdvisor();
    advisor.setTransactionAttributeSource(transactionAttributeSource);
    advisor.setAdvice(transactionInterceptor);
    if (this.enableTx != null) {
        advisor.setOrder(this.enableTx.<Integer>getNumber("order"));
    }
    return advisor;
}
Also used : BeanFactoryTransactionAttributeSourceAdvisor(org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor) Role(org.springframework.context.annotation.Role) Bean(org.springframework.context.annotation.Bean)

Example 24 with Role

use of org.springframework.context.annotation.Role in project spring-framework by spring-projects.

the class ProxyTransactionManagementConfiguration method transactionInterceptor.

@Bean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public TransactionInterceptor transactionInterceptor(TransactionAttributeSource transactionAttributeSource) {
    TransactionInterceptor interceptor = new TransactionInterceptor();
    interceptor.setTransactionAttributeSource(transactionAttributeSource);
    if (this.txManager != null) {
        interceptor.setTransactionManager(this.txManager);
    }
    return interceptor;
}
Also used : TransactionInterceptor(org.springframework.transaction.interceptor.TransactionInterceptor) Role(org.springframework.context.annotation.Role) Bean(org.springframework.context.annotation.Bean)

Aggregations

Bean (org.springframework.context.annotation.Bean)24 Role (org.springframework.context.annotation.Role)24 BeanFactoryCacheOperationSourceAdvisor (org.springframework.cache.interceptor.BeanFactoryCacheOperationSourceAdvisor)4 CacheInterceptor (org.springframework.cache.interceptor.CacheInterceptor)4 CacheAdvisor (com.alicp.jetcache.anno.aop.CacheAdvisor)2 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)2 MessageInterpolatorFactory (org.springframework.boot.validation.MessageInterpolatorFactory)2 BeanFactoryJCacheOperationSourceAdvisor (org.springframework.cache.jcache.interceptor.BeanFactoryJCacheOperationSourceAdvisor)2 JCacheInterceptor (org.springframework.cache.jcache.interceptor.JCacheInterceptor)2 ExpressionBasedAnnotationAttributeFactory (org.springframework.security.access.expression.method.ExpressionBasedAnnotationAttributeFactory)2 DelegatingMethodSecurityMetadataSource (org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource)2 PrePostAnnotationSecurityMetadataSource (org.springframework.security.access.prepost.PrePostAnnotationSecurityMetadataSource)2 BeanFactoryTransactionAttributeSourceAdvisor (org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor)2 TransactionInterceptor (org.springframework.transaction.interceptor.TransactionInterceptor)2 LocalValidatorFactoryBean (org.springframework.validation.beanvalidation.LocalValidatorFactoryBean)2 JetCacheInterceptor (com.alicp.jetcache.anno.aop.JetCacheInterceptor)1 ArrayList (java.util.ArrayList)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 IntegrationMBeanExporter (org.springframework.integration.monitor.IntegrationMBeanExporter)1 Jsr250MethodSecurityMetadataSource (org.springframework.security.access.annotation.Jsr250MethodSecurityMetadataSource)1