我正在Windows 7上使用Intellij,使用Spring Framework版本4.3.18.RELEASE。例如,我正在查看类的反编译代码。
org.springframework.core.io.DefaultResourceLoader
而这个方法
public Resource getResource(String location).
在那段代码中有一个测试
location.startsWith("/")
当位置是一个以驱动器字母为开头的绝对Windows路径时,会出现错误。例如:
d:/git/thredds/dap4/d4tests/src/test/resources/
有没有已知的替代规范,可以实现这样的路径?
file:///data/resources/file.txt
在Windows中使用以下路径:c:\data\resources\file.txt
- miloxe