Log.java 948 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package com.gyjiot.common.annotation;
  2. import com.gyjiot.common.enums.BusinessType;
  3. import com.gyjiot.common.enums.OperatorType;
  4. import java.lang.annotation.*;
  5. /**
  6. * 自定义操作日志记录注解
  7. *
  8. * @author ruoyi
  9. *
  10. */
  11. @Target({ ElementType.PARAMETER, ElementType.METHOD })
  12. @Retention(RetentionPolicy.RUNTIME)
  13. @Documented
  14. public @interface Log
  15. {
  16. /**
  17. * 模块
  18. */
  19. public String title() default "";
  20. /**
  21. * 功能
  22. */
  23. public BusinessType businessType() default BusinessType.OTHER;
  24. /**
  25. * 操作人类别
  26. */
  27. public OperatorType operatorType() default OperatorType.MANAGE;
  28. /**
  29. * 是否保存请求的参数
  30. */
  31. public boolean isSaveRequestData() default true;
  32. /**
  33. * 是否保存响应的参数
  34. */
  35. public boolean isSaveResponseData() default true;
  36. /**
  37. * 排除指定的请求参数
  38. */
  39. public String[] excludeParamNames() default {};
  40. }