public static void checkDuplicate(final Class<?> cls) {
        try {
            String path = cls.getName().replace('.', '/') + ".class";
            Set<String> files = readResources(path, cls);
            // duplicated jar is found
            if (files.size() > 1) {
                String error = "Duplicate class " + path + " in " + files.size() + " jar " + files;
                LOG.error("checkDuplicate error,{}", error);
            }
        } catch (Throwable e) {
            LOG.error("checkDuplicate error,msg :{}", e.getMessage(), e);
        }
    }
checkDuplicate,this method refers to the design of dubbo .
@param cls cls
shenyu-common/src/main/java/org/apache/shenyu/common/utils/VersionUtils.java