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