Annotation Type OperationLogParam


@Target(PARAMETER) @Retention(RUNTIME) @Documented @Inherited public @interface OperationLogParam
操作日志参数注解 将该注解加在带 OperationLog 的方法上,

如果参数值为 null 则默认不在日志输出该参数,如需输出,参见 OperationLogProperties

若将参数中的大对象标记为记录,且使用默认的参数解析方式(展平,类似json),容易造成解析后的字符串较长

Author:
lym
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    值转换器的实现类
    参数名称,默认取变量名, 如 public void test(@OperationLogParam String foo),则 name 默认为 'foo'
    boolean
    参数是否支持多语言,默认为不支持多语言
    以该值,作为 value。支持 SPEL
  • Element Details

    • supportI18n

      boolean supportI18n
      参数是否支持多语言,默认为不支持多语言
      Default:
      false
    • name

      String name
      参数名称,默认取变量名, 如 public void test(@OperationLogParam String foo),则 name 默认为 'foo'
      Default:
      ""
    • value

      String value
      以该值,作为 value。支持 SPEL

      举例:参数为 user,需要记录是否为 admin 则使用 function(@OperationLogParam(value = "#user.role") User user)

      Default:
      ""
    • converter

      值转换器的实现类

      注意!值转换器的实现类需要注入在 spring 容器内。若 value() 有值则以 value 为准。

      Default:
      org.shoulder.log.operation.format.covertor.DefaultOperationLogParamValueConverter.class