读取properties文件里的某属性
/*** 读取文件库配置文件*/Properties properties = new Properties();InputStream ips = ImageServiceImpl.class.getClassLoader().getResourceAsStream("config.properties");properties.load(ips);String path = properties.getProperty("imagePath");String servicePath = properties.getProperty("imageServicePath");
读取Resource文件夹下的文件
InputStream file = this.getClass().getResourceAsStream("/templates/statistics/templatesfileExcel/阿斯顿.xlsx");