ClassPathResource读取自定义JSON资源文件
ClassPathResource cpr = new ClassPathResource("/map/demo.json");byte[] bdata = FileCopyUtils.copyToByteArray(cpr.getInputStream());String data = new String(bdata, StandardCharsets.UTF_8);
JSONObject Info = JSONObject.parseObject(data);
其中在copyToByteArray中
原创
2020-07-27 22:22:21 ·
797 阅读 ·
0 评论