Skip to content

Commit

Permalink
Support List and Map for json type
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangrongfan committed Dec 29, 2018
1 parent 3ed50c9 commit a16f8a8
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ public Object intercept(Invocation invocation) throws Throwable {
if (content != null) {
Field field = fieldCache.computeIfAbsent(properties.get(i % properties.size()),
UncheckedFunction.of(key -> ReflectionUtils.makeAccessible(type.getDeclaredField(key))));
field.set(proceed.get(i / properties.size()),
JsonTypeHandler.objectMapper.readValue(content,
field.set(proceed.get(i / properties.size()), JsonTypeHandler.objectMapper.readValue(content,
JsonTypeHandler.objectMapper.constructType(field.getGenericType())));
}
}
Expand Down

0 comments on commit a16f8a8

Please sign in to comment.