- Java code
private String rootClassPath = this.getClass().getResource("/").getPath();
用这个取到的rootClassPath,我发现它会把路径下的空格转成%20
改怎么解决?
------解决方案--------------------
- Java code
Thread.currentThread().getContextClassLoader().getResource("").getPath();
------解决方案--------------------