【发布时间】:2012-03-05 08:37:04
【问题描述】:
我在我的测试类中使用下面的代码,加载类路径和 application-content.xml 文件中的所有 spring.xml 文件。
@Override
protected String[] getConfigLocations() {
return new String[] {
"classpath*:META-INF/spring.xml", "application-context.xml"};
}
有没有办法打印类路径中所有“spring.xml”文件的路径?我有许多 jar 文件,其中包含 spring.xml。然而,其中一些可能不是运行测试所必需的。有没有办法打印它们(jar 文件或路径)并删除程序不需要的 spring.xml 文件?
【问题讨论】:
-
感谢编辑,Tichodrama。