@@ -0,0 +1,3207 @@
+package com.robin.core.query.util;%0A%0Aimport com.robin.core.base.exception.MissingConfigExecption;%0Aimport lombok.extern.slf4j.Slf4j;%0Aimport org.springframework.core.io.Resource;%0Aimport org.springframework.core.io.support.PathMatchingResourcePatternResolver;%0A%0Aimport java.io.File;%0Aimport java.io.FileInputStream;%0Aimport java.io.InputStream;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A@Slf4j%0Apublic class ConfigResourceScanner %7B%0A    public static List%3CInputStream%3E doScan(String xmlConfigPath,String... defaultPath)%7B%0A        List%3CInputStream%3E resList=new ArrayList%3C%3E();%0A        try %7B%0A            String xmlpath = xmlConfigPath;%0A%0A            String classesPath = null;%0A            PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();%0A            //default config at queryConfig in classpath%0A            if (xmlpath == null %7C%7C %22%22.equals(xmlpath)) %7B%0A                if(defaultPath.length%3E0)%0A                    classesPath=defaultPath%5B0%5D;%0A                else%0A                    classesPath = %22queryConfig%22;%0A            %7D else %7B%0A                if (xmlpath.startsWith(%22classpath:%22)) %7B%0A                    String relativePath = xmlpath.substring(10);%0A                    classesPath = relativePath;%0A                %7D else if (xmlpath.startsWith(%22jarpath:%22)) %7B%0A                    //read config at relative folder where jar present%0A                    String relativePath = xmlpath.substring(8);%0A                    String jarRelativePath = ConfigResourceScanner.class.getClassLoader().getResource(%22%22).toURI().toString();%0A                    int pos = jarRelativePath.indexOf(%22file:/%22);%0A                    String path = jarRelativePath.substring(pos + 6);%0A                    pos = path.indexOf(%22jar!/%22);%0A                    if (pos != -1) %7B%0A                        path = path.substring(0, pos);%0A                        pos = path.lastIndexOf(%22/%22);%0A                        path = path.substring(0, pos);%0A                        xmlpath = path + %22/%22 + relativePath;%0A                    %7D%0A                %7D%0A            %7D%0A            log.info(%22parse config queryMap file from path=%7B%7D%22, classesPath == null ? xmlpath : %22classpath:%22 + classesPath);%0A            if (classesPath != null) %7B%0A                Resource%5B%5D configFiles = resolver.getResources(%22classpath:%22 + classesPath + %22/*.xml%22);%0A                for (Resource configFile : configFiles) %7B%0A                    resList.add(configFile.getInputStream());%0A                %7D%0A            %7D else %7B%0A                File file = new File(xmlpath);%0A                if (!file.isDirectory()) %7B%0A                    throw new MissingConfigExecption(%22no query XML found in path!%22);%0A                %7D%0A                File%5B%5D files = file.listFiles();%0A                for (int i = 0; i %3C files.length; i++) %7B%0A                    File subfile = files%5Bi%5D;%0A                    if (subfile.getName().toLowerCase().endsWith(%22xml%22))%0A                        resList.add(new FileInputStream(subfile));%0A                %7D%0A            %7D%0A        %7D catch (Exception e) %7B%0A            log.error(%22%22, e);%0A            e.printStackTrace();%0A            System.out.println(e.getMessage());%0A        %7D finally %7B%0A%0A        %7D%0A        return resList;%0A    %7D%0A%7D%0A

change comm-lang to lang3