java spring 读取 文件内容
Resu
// set file of pathResource res = new ClassPathResource("config/tmp.txt");//set read str of encodingEncodedResource encRes = new EncodedResource(res,"utf-8");//read fileString content = FileCopyUtils.copyToString(encRes.getReader);/////////////////////////////////////////////////////////////////////////////////////////ResourcePatternResolver resolver = new PathMatchingResoucePatternResolver();Resource resource[] = resolver.getResources("classpath*:com/test/**/*.xml");for (Resource r in resource){ System.out.println(r.getDescription());}? ----- 任意一个字符* ----- 任意多个字符** ----- 多层路径
?