[monitor] 自定义校验器注解@HostValid

This commit is contained in:
tomsun28
2021-11-17 20:21:28 +08:00
parent 9760472d61
commit 4257b19164
7 changed files with 95 additions and 6 deletions

View File

@@ -65,8 +65,10 @@ public class WheelTimerTask implements TimerTask {
if (value.startsWith("^_^")) {
value = value.replaceAll("\\^_\\^", "");
Configmap param = configmap.get(value);
value = (String) param.getValue();
jsonObject.addProperty(entry.getKey(), value);
if (param != null) {
value = (String) param.getValue();
jsonObject.addProperty(entry.getKey(), value);
}
}
} else {
jsonObject.add(entry.getKey(), replaceSpecialValue(entry.getValue(), configmap));
@@ -82,8 +84,10 @@ public class WheelTimerTask implements TimerTask {
if (value.startsWith("^_^")) {
value = value.replaceAll("\\^_\\^", "");
Configmap param = configmap.get(value);
value = (String) param.getValue();
jsonArray.set(i, new JsonPrimitive(value));
if (param != null) {
value = (String) param.getValue();
jsonArray.set(i, new JsonPrimitive(value));
}
}
} else {
jsonArray.set(i, replaceSpecialValue(element, configmap));