
io.leopard.test.ApplicationContextLocationFirstImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of leopard-test Show documentation
Show all versions of leopard-test Show documentation
集成测试、单元测试时,不需要为测试做任何额外的Spring相关配置。
package io.leopard.test;
import org.springframework.core.io.ClassPathResource;
public class ApplicationContextLocationFirstImpl implements ApplicationContextLocation {
/** 第一个入口 */
private static final String ENTRY_FIRST = "/integrationTest.xml";
@Override
public String[] get() {
ClassPathResource resource = new ClassPathResource(ENTRY_FIRST);
System.err.println("resource.exists():" + resource.exists() + " ENTRY_FIRST:" + ENTRY_FIRST);
if (resource.exists()) {
return new String[] { ENTRY_FIRST };
}
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy