Java/Spring
classpath 안에 있는 json 파일 읽어서 json 객체 만들기
오늘의개발부
2020. 6. 18. 13:03
반응형
ClassPathResource resource = new ClassPathResource("json/succcess.json");
JSONObject json = (JSONObject) new JSONParser().parse(new InputStreamReader(resource.getInputStream(), "UTF-8")); //json-simple
IDE에서도, zar 안에서도 이상없이 작동한다.
반응형