Log.java 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package com.doc.common.annotation;
  2. import com.doc.common.enums.BusinessType;
  3. import com.doc.common.enums.EventLevel;
  4. import com.doc.common.enums.EventType;
  5. import com.doc.common.enums.OperatorType;
  6. import java.lang.annotation.*;
  7. /**
  8. * 自定义操作日志记录注解
  9. *
  10. * @author ruoyi
  11. */
  12. @Target({ElementType.PARAMETER, ElementType.METHOD})
  13. @Retention(RetentionPolicy.RUNTIME)
  14. @Documented
  15. public @interface Log {
  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 EventType eventType() default EventType.BUSINESS;
  32. /**
  33. * 事件类型
  34. */
  35. public EventLevel eventLevel() default EventLevel.LOW;
  36. /**
  37. * 是否保存请求的参数
  38. */
  39. public boolean isSaveRequestData() default true;
  40. /**
  41. * 是否保存响应的参数
  42. */
  43. public boolean isSaveResponseData() default true;
  44. /**
  45. * 排除指定的请求参数
  46. */
  47. public String[] excludeParamNames() default {};
  48. }