spring从resource中读取json数据
import org.apache.commons.io.IOUtils;
import org.springframework.core.io.ClassPathResource;
...
ClassPathResource resource = new ClassPathResource("demo.json");
String jsonStr = IOUtils.toString(resource.getInputStream(), StandardCharsets.UTF_8);
JSONObject jsonObject = JSON.parseObject(jsonStr);
...