#502 Support NONE healthChecker deserialize

This commit is contained in:
nkorange 2019-03-15 15:36:17 +08:00
parent 2dd28b1209
commit 99513a2fe8

View File

@ -55,6 +55,10 @@ public class JsonAdapter implements ObjectDeserializer, ObjectSerializer {
return (T) JSON.parseObject(jsonObj.toJSONString(), AbstractHealthChecker.Tcp.class); return (T) JSON.parseObject(jsonObj.toJSONString(), AbstractHealthChecker.Tcp.class);
} }
if (StringUtils.equals(checkType, AbstractHealthChecker.None.TYPE)) {
return (T) JSON.parseObject(jsonObj.toJSONString(), AbstractHealthChecker.None.class);
}
if (StringUtils.equals(checkType, AbstractHealthChecker.Mysql.TYPE)) { if (StringUtils.equals(checkType, AbstractHealthChecker.Mysql.TYPE)) {
return (T) JSON.parseObject(jsonObj.toJSONString(), AbstractHealthChecker.Mysql.class); return (T) JSON.parseObject(jsonObj.toJSONString(), AbstractHealthChecker.Mysql.class);
} }