操作参数化

This commit is contained in:
DU 2021-02-02 11:31:58 +08:00
parent 12b6bca36a
commit f504f457ed

View File

@ -62,7 +62,7 @@ public class OperateMethod {
ParameterizedType parameterizedType = (ParameterizedType) parameter.getParameterizedType();
Class<?> actualClass = (Class<?>) parameterizedType.getActualTypeArguments()[0];
args[i] = JsonUtils.read(JsonUtils.writeValueAsString(param.get(parameter.getName())),
JsonUtils.getCollectionType(ArrayList.class, actualClass));
JsonUtils.getCollectionType(parameter.getType(), actualClass));
} else if (parameter.getType().isEnum()) {
Object o = param.get(parameter.getName());
Object[] enumConstants = parameter.getType().getEnumConstants();