Browse Source

REPORT-76857 云端运维插件也会被环境检测检测到

只检测 web-inf/lib 和 designer/lib 下面的。
忽视插件
new-design
Harrison 2 years ago
parent
commit
f6c6f15f62
  1. 4
      designer-base/src/main/java/com/fr/env/detect/impl/converter/ClassConflictConvertor.java

4
designer-base/src/main/java/com/fr/env/detect/impl/converter/ClassConflictConvertor.java vendored

@ -48,6 +48,7 @@ public class ClassConflictConvertor implements ThrowableConverter {
private static final String JAR_URL_SUFFIX = ".jar!";
private static final String JAR_FILE_SUFFIX = ".jar";
private static final String FILE_URL_PREFIX = "file:";
private static final String PLUGINS_DIR_NAME = "plugins";
private final Map<Class<?>, ClassNameConverter> throwableMap = new HashMap<>();
@ -108,6 +109,9 @@ public class ClassConflictConvertor implements ThrowableConverter {
for (URL url : urlList) {
String file = url.getFile();
String decodeFileStr = URLDecoder.decode(file, EncodeConstants.ENCODING_UTF_8);
if (decodeFileStr.contains(PLUGINS_DIR_NAME)) {
continue;
}
if (decodeFileStr.contains(JAR_URL_SUFFIX)) {
String jarPath = decodeFileStr.substring(FILE_URL_PREFIX.length(), decodeFileStr.indexOf(JAR_URL_SUFFIX) + JAR_FILE_SUFFIX.length());
String jar = new File(jarPath).getName();

Loading…
Cancel
Save