读取spring工程中resource的文件
Resource resource = new ClassPathResource("data.json"); // 读文件到字符串 String fileContent = FileUtils.readFileToString(resource.getFile(), "UTF-8");
Resource resource = new ClassPathResource("data.json"); // 读文件到字符串 String fileContent = FileUtils.readFileToString(resource.getFile(), "UTF-8");