| | |
| | | import com.fasterxml.jackson.core.type.TypeReference; |
| | | import lombok.*; |
| | | |
| | | import java.lang.reflect.Field; |
| | | |
| | | /** |
| | | * 文件配置表 |
| | | * |
| | |
| | | |
| | | public static class FileClientConfigTypeHandler extends AbstractJsonTypeHandler<Object> { |
| | | |
| | | public FileClientConfigTypeHandler(Class<?> type) { |
| | | super(type); |
| | | } |
| | | |
| | | public FileClientConfigTypeHandler(Class<?> type, Field field) { |
| | | super(type, field); |
| | | } |
| | | |
| | | @Override |
| | | protected Object parse(String json) { |
| | | public Object parse(String json) { |
| | | FileClientConfig config = JsonUtils.parseObjectQuietly(json, new TypeReference<FileClientConfig>() {}); |
| | | if (config != null) { |
| | | return config; |
| | |
| | | } |
| | | |
| | | @Override |
| | | protected String toJson(Object obj) { |
| | | public String toJson(Object obj) { |
| | | return JsonUtils.toJsonString(obj); |
| | | } |
| | | |