package mytest;import java.net.URL;
import java.util.Enumeration;public class TestGetResources {
    public static void main(String[] args) throws Exception {       Enumeration<URL> urls= getClassLoader().getResources("/config1/1.xml");        while (urls.hasMoreElements()){
            URL url=urls.nextElement();
            System.out.println(url.getFile());
        }
    }    private static ClassLoader getClassLoader() throws Exception{
//        return TestGetResources.class.getClassLoader();
        return Thread.currentThread().getContextClassLoader();
    }
}/config1/1.xml这个明明是存在的,编译后类路径中也可以看到它,为什么执行的时候,返回结果是空呢?