这是在spring4之后。
@RequestMapping(value = "/returnjson") public ModelAndView getfsd(){ ModelAndView modelAndView=new ModelAndView(new MappingJackson2JsonView()); modelAndView.addObject("result","success"); return modelAndView; }
原文地址:https://www.cnblogs.com/fankailei/p/10075712.html
时间: 2024-10-14 21:14:48