读取resources下文件的方法 网上有问答如下:问: new FileInputStream("src/main/resources/all.properties") new FileInputStream("./src/main/resources/all.properties") 上面两个无法读取maven下资源文件目录下的文件嘛,总是提示找不到该路径,这么写错了嘛,但是我的其他maven可以读取 答: 要取编译后的路径,而不是你看到的src/main/re…
package com.expr.exceldemo; import org.springframework.core.io.ClassPathResource; public class Test { public static void main(String[] args) { ClassPathResource classPathResource = new ClassPathResource("2019年4月园企业经营情况表(当月值).xlsx"); boolean exis…