diff --git a/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/JsonAdapter.java b/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/JsonAdapter.java index 46eb8f36e..fbc245472 100644 --- a/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/JsonAdapter.java +++ b/naming/src/main/java/com/alibaba/nacos/naming/healthcheck/JsonAdapter.java @@ -55,6 +55,10 @@ public class JsonAdapter implements ObjectDeserializer, ObjectSerializer { 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)) { return (T) JSON.parseObject(jsonObj.toJSONString(), AbstractHealthChecker.Mysql.class); }