Pathmatchingresourcepatternresolver is a wildcard identifier for the resource finder, including:
/web-inf/*-context.xml
Com/mycompany/**/applicationcontext.xml
File:c:/some/path/*-context.xml
Classpath:com/mycompany/**/applicationcontext.xml
If you want to process a file under a directory, you can do the following code:
Java code
- Resourcepatternresolver resolver = new Pathmatchingresourcepatternresolver ();
- resource[] Resources = resolver.getresources ("Classpath:com/you/atlas/webx/context/*.class");
- System.out.println (resources[0].geturl ());
- : File:/home/work/branche/springtest/target/classes/com/you/atlas/webx/context/webxcontextloader. class
Spring Sqlmapclientfactorybean provides a setmappinglocations method to support "/myapp/*-map.xml" without forcing a sqlpmap to add an XML file
Spring's pathmatchingresourcepatternresolver-wildcard resource finder