diff --git a/com.creditease.uav.monitorframework/src/main/java/com/creditease/uav/util/MonitorServerUtil.java b/com.creditease.uav.monitorframework/src/main/java/com/creditease/uav/util/MonitorServerUtil.java index 311837e6..1775c43a 100644 --- a/com.creditease.uav.monitorframework/src/main/java/com/creditease/uav/util/MonitorServerUtil.java +++ b/com.creditease.uav.monitorframework/src/main/java/com/creditease/uav/util/MonitorServerUtil.java @@ -328,6 +328,14 @@ public static String getApplicationId(String contextroot, String basePath) { else { String tmp = basePath.replace("\\", "/"); int index = tmp.lastIndexOf("/"); + + /** + * "/app/xxxxx/" remove the last "/" to get the appid + */ + if (index == tmp.length() - 1) { + tmp = tmp.substring(0, tmp.length() - 1); + index = tmp.lastIndexOf("/"); + } appid = tmp.substring(index + 1); }