CacheBatchEvict.java 603 B

123456789101112131415161718192021222324252627
  1. package com.yanfan.common.annotation;
  2. import java.lang.annotation.*;
  3. /**
  4. * @description: 缓存批量清除注解
  5. * @author: laizhenghua
  6. * @date: 2022/5/22 22:25
  7. */
  8. @Inherited
  9. @Documented
  10. @Retention(RetentionPolicy.RUNTIME)
  11. @Target({ElementType.TYPE, ElementType.METHOD})
  12. public @interface CacheBatchEvict {
  13. /**
  14. * 指定缓存组件
  15. */
  16. String cacheNames() default "";
  17. /**
  18. * key需要指定一个spEL表达式,通过spEL表达式获取方法参数
  19. */
  20. String key() default "";
  21. /**
  22. * 是否清除所有
  23. */
  24. boolean isClearAll() default false;
  25. }