@Component public class MenuCacheAspect extends BaseCacheAspect
限定符和类型 | 字段和说明 |
---|---|
private java.lang.String |
menusPrefix |
cacheName, log
构造器和说明 |
---|
MenuCacheAspect() |
限定符和类型 | 方法和说明 |
---|---|
void |
afterAdvice()
使用后置通知更新缓存或者清除缓存
|
java.lang.Object |
cacheableAdvice(org.aspectj.lang.ProceedingJoinPoint pjp,
java.util.Set<Role> arg)
使用环绕通知来处理缓存查询逻辑
|
private void |
cacheablePointcut(java.util.Set<Role> arg)
需要缓存的数据的切点
业务层不缓存“根据主键获取实体”
|
private java.lang.String |
menusKey(java.util.Set<Role> roles) |
private void |
resourceCacheableClearPointcut()
清除菜单缓存切点
前置条件为资源被更新
|
private void |
resourceServiceServicePointcut()
匹配资源Service
|
private void |
roleCacheableClearPointcut()
清除菜单缓存切点
前置条件是角色被更新
|
private void |
roleServiceServicePointcut()
匹配角色Service
|
afterPropertiesSet, clear, evict, get, put, setCacheManager, setCacheName
private void resourceServiceServicePointcut()
private void roleServiceServicePointcut()
private void resourceCacheableClearPointcut()
private void roleCacheableClearPointcut()
private void cacheablePointcut(java.util.Set<Role> arg)
public java.lang.Object cacheableAdvice(org.aspectj.lang.ProceedingJoinPoint pjp, java.util.Set<Role> arg) throws java.lang.Throwable
pjp
- ProceedingJoinPointjava.lang.Throwable
public void afterAdvice()
private java.lang.String menusKey(java.util.Set<Role> roles)