@RequestMapping(value = "/json1", method = RequestMethod.GET) public String json1(Locale locale, Model model) throws Exception { HashMap<String, String> result = new HashMap<String, String>(); result.put("A", "A"); result.put("B", "B"); model.addAttribute("data", result); return messageSetter.set0000(model); }
@RequestMapping(value = "/json2", method = RequestMethod.GET) public String json2(Locale locale, Model model) throws Exception { return messageSetter.setModelWithMessage(model, "0011", "AAAA"); }