一 加载资源,一般两种方式,class使用绝对路径,thread使用相对包路径
URL t = Thread.currentThread().getContextClassLoader().getResource("META-INF/log4j.properties");
InputStream in2 = Thread.currentThread().getContextClassLoader().getResourceAsStream("META-INF/log4j.properties");
URL t1 = Bootstrap.class.getResource("/META-INF/log4j.properties");
InputStream in = Bootstrap.class .getResourceAsStream("/META-INF/log4j.properties");