ClassPathResource resource = new ClassPathResource("properties/post2LazadaTest.json"); File file= = resource.getFile(); JSONArray btnArray = null; //读取文件 String input = FileUtils.readFileToString(file, "UTF-8");