springboot 读取 resource 下的文件

 

ClassPathResource classPathResource = new ClassPathResource("template/demo/200000168-check-response.xml");
            InputStream inputStream = classPathResource.getInputStream();
            responseXml = new String(FilesUtil.read(inputStream), Cons.GBK);

 

posted @ 2019-12-22 16:05  xiluhua  阅读(1741)  评论(0编辑  收藏  举报