spring boot 获取系统资源文件

ClassPathResource classPathResource = new ClassPathResource("static/fonts/");spring

classPathResource .getURI().getPath(); //获取文件路径ci

ClassPathResource classPathResource = new ClassPathResource("financialTemplate/financial.xlsx");资源

classPathResource.getInputStream(); //获取文件流get

spring boot下 获取resources文件夹的资源文件class

相关文章
相关标签/搜索