我在测试类中使用下面的代码来加载classpath和application-content.xml文件中的所有spring.xml文件。在classpath中打印spring.xml的路径
@Override
protected String[] getConfigLocations() {
return new String[] {
"classpath*:META-INF/spring.xml", "application-context.xml"};
}
有没有办法在类路径中打印所有“spring.xml”文件的路径?我有许多jar.xml文件,其中包含spring.xml。但是其中一些可能不需要运行测试。有没有办法打印它们(jar文件或路径),并删除不需要编程的spring.xml文件?
感谢您的编辑,Tichodrama。 – 2012-03-05 08:43:50