Search in sources :

Example 1 with Aspect

use of cn.taketoday.aop.support.annotation.Aspect in project today-framework by TAKETODAY.

the class ProxyCachingConfiguration method cacheEvictInterceptor.

@Aspect
@Component
@ConditionalOnMissingBean
@Advice(CacheEvict.class)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
CacheEvictInterceptor cacheEvictInterceptor(CacheManager cacheManager, CacheExpressionOperations operations) {
    CacheEvictInterceptor cacheEvictInterceptor = new CacheEvictInterceptor(cacheManager);
    cacheEvictInterceptor.setExpressionOperations(operations);
    return cacheEvictInterceptor;
}
Also used : CacheEvictInterceptor(cn.taketoday.cache.interceptor.CacheEvictInterceptor) Role(cn.taketoday.context.annotation.Role) ConditionalOnMissingBean(cn.taketoday.context.condition.ConditionalOnMissingBean) Advice(cn.taketoday.aop.support.annotation.Advice) Aspect(cn.taketoday.aop.support.annotation.Aspect) Component(cn.taketoday.lang.Component)

Example 2 with Aspect

use of cn.taketoday.aop.support.annotation.Aspect in project today-framework by TAKETODAY.

the class ProxyCachingConfiguration method cacheableInterceptor.

@Aspect
@Component
@Advice(Cacheable.class)
@ConditionalOnMissingBean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
CacheableInterceptor cacheableInterceptor(CacheManager cacheManager, CacheExpressionOperations operations) {
    CacheableInterceptor cacheableInterceptor = new CacheableInterceptor(cacheManager);
    cacheableInterceptor.setExpressionOperations(operations);
    return cacheableInterceptor;
}
Also used : CacheableInterceptor(cn.taketoday.cache.interceptor.CacheableInterceptor) Role(cn.taketoday.context.annotation.Role) ConditionalOnMissingBean(cn.taketoday.context.condition.ConditionalOnMissingBean) Advice(cn.taketoday.aop.support.annotation.Advice) Aspect(cn.taketoday.aop.support.annotation.Aspect) Component(cn.taketoday.lang.Component)

Example 3 with Aspect

use of cn.taketoday.aop.support.annotation.Aspect in project today-framework by TAKETODAY.

the class ProxyCachingConfiguration method cachePutInterceptor.

@Aspect
@Component
@Advice(CachePut.class)
@ConditionalOnMissingBean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
CachePutInterceptor cachePutInterceptor(CacheManager cacheManager, CacheExpressionOperations operations) {
    CachePutInterceptor cachePutInterceptor = new CachePutInterceptor(cacheManager);
    cachePutInterceptor.setExpressionOperations(operations);
    return cachePutInterceptor;
}
Also used : CachePutInterceptor(cn.taketoday.cache.interceptor.CachePutInterceptor) Role(cn.taketoday.context.annotation.Role) ConditionalOnMissingBean(cn.taketoday.context.condition.ConditionalOnMissingBean) Advice(cn.taketoday.aop.support.annotation.Advice) Aspect(cn.taketoday.aop.support.annotation.Aspect) Component(cn.taketoday.lang.Component)

Aggregations

Advice (cn.taketoday.aop.support.annotation.Advice)3 Aspect (cn.taketoday.aop.support.annotation.Aspect)3 Role (cn.taketoday.context.annotation.Role)3 ConditionalOnMissingBean (cn.taketoday.context.condition.ConditionalOnMissingBean)3 Component (cn.taketoday.lang.Component)3 CacheEvictInterceptor (cn.taketoday.cache.interceptor.CacheEvictInterceptor)1 CachePutInterceptor (cn.taketoday.cache.interceptor.CachePutInterceptor)1 CacheableInterceptor (cn.taketoday.cache.interceptor.CacheableInterceptor)1