Class DefaultOperationLogParamValueConverter
java.lang.Object
org.shoulder.log.operation.format.covertor.DefaultOperationLogParamValueConverter
- All Implemented Interfaces:
OperationLogParamValueConverter
public class DefaultOperationLogParamValueConverter
extends Object
implements OperationLogParamValueConverter
默认的 value 转换器
对数组和可迭代的对象做了展平处理。
普通对象如DTO 则使用其 toString() 方法,如 XxxDTO(field1=1, field2=2,field3=3)
- Author:
- lym
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert(OperationLogDTO opLog, Object paramValue, Class<?> methodParamClazz) 转换日志参数值toStringList(Object obj)
-
Constructor Details
-
DefaultOperationLogParamValueConverter
public DefaultOperationLogParamValueConverter() -
DefaultOperationLogParamValueConverter
-
-
Method Details
-
convert
public List<String> convert(@Nonnull OperationLogDTO opLog, @Nullable Object paramValue, Class<?> methodParamClazz) Description copied from interface:OperationLogParamValueConverter转换日志参数值- Specified by:
convertin interfaceOperationLogParamValueConverter- Parameters:
opLog- 预先生成的日志实体,可以从这里拿到操动作标识等自定义业务标识paramValue- 参数值,paramValue.getClass() 不一定等于 methodParamClazzmethodParamClazz- 代码中方法描述的参数类型- Returns:
- 转化后的 value,允许有多个值
-
toStringList
-