@Test public void testRuntimeClasspath() throws Exception { logger.info("testRuntimeClasspath()"); ResourceLoader loader = new ResourceLoader(null); in = loader.getResourceAsStream("classpath:contexts/propContext.xml"); assertNotNull("returned resource", in); Document dom = ParseUtil.parse(new InputSource(in)); String testValue = new XPathWrapper("/b:beans/b:bean/b:property[@name='propAsRefId']/@ref") .bindNamespace("b", "http: .evaluateAsString(dom); assertEquals("fingerprint on loaded resource", "example", testValue); }
public InputStream getResourceAsStream(String name) throws IOException { if (name.startsWith("classpath:")) return openClasspathResource(name); else if (name.startsWith("file:")) return openFileResource(name); else return openWarResource(name); }
ResourceLoader { public InputStream getResourceAsStream(String name) throws IOException { if (name.startsWith("classpath:")) return openClasspathResource(name); else if (name.startsWith("file:")) return openFileResource(name); else return openWarResource(name); } }
ResourceLoader { public InputStream getResourceAsStream(String name) throws IOException { if (name.startsWith("classpath:")) return openClasspathResource(name); else if (name.startsWith("file:")) return openFileResource(name); else return openWarResource(name); } ResourceLoader(WarMachine war);  ResourceLoader(WarMachine war, String baseDir); }
ResourceLoader { public InputStream getResourceAsStream(String name) throws IOException { if (name.startsWith("classpath:")) return openClasspathResource(name); else if (name.startsWith("file:")) return openFileResource(name); else return openWarResource(name); } ResourceLoader(WarMachine war);  ResourceLoader(WarMachine war, String baseDir); InputStream getResourceAsStream(String name); static List<String> decomposeResourceReferences(String resourceConfig); InputStream openClasspathResource(String name); InputStream openFileResource(String name); InputStream openWarResource(String name); }
ResourceLoader { public InputStream getResourceAsStream(String name) throws IOException { if (name.startsWith("classpath:")) return openClasspathResource(name); else if (name.startsWith("file:")) return openFileResource(name); else return openWarResource(name); } ResourceLoader(WarMachine war);  ResourceLoader(WarMachine war, String baseDir); InputStream getResourceAsStream(String name); static List<String> decomposeResourceReferences(String resourceConfig); InputStream openClasspathResource(String name); InputStream openFileResource(String name); InputStream openWarResource(String name);  }