首页 > 编程语言 > 详细

springboot 读取 resource 下的文件

时间:2019-12-22 16:50:16      阅读:99      评论:0      收藏:0      [点我收藏+]

 

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

 

springboot 读取 resource 下的文件

原文:https://www.cnblogs.com/xiluhua/p/12080047.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!