spring resources 읽기1 [Spring] 스프링 Resources 파일 읽기, 복사 resoruces에 위치한 data.json을 읽어야 한다. { "hello": "123" } data.json의 내용은 다음과 같다. @SpringBootApplication public class RestApIsApplication { public static void main(String[] args) throws IOException { SpringApplication.run(RestApIsApplication.class, args); ClassPathResource resource = new ClassPathResource("data.json"); BufferedReader br = new BufferedReader(new InputStreamReader(resource.getInputStrea.. 2022. 8. 12. 이전 1 다음