How to pass local filename to ClassPathXmlApplicationContext?
问题 By "local filename" I mean that resource file is located in the same directory as class file. In the case below this is JUnitRunner.class file. Java's getResource() file can handle this if path does not start with / ' I can't figure out, how to do the same ClassPathXmlApplicationContext constructor? package springtests; import java.io.File; import java.net.URISyntaxException; import java.net.URL; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org