使用httprequester接口测试能返回数据,但是用ajax返回json格式的时候返回报500Internal Server Error. The server encountered an internal error that prevented it from fulfilling this request org.springframework .web.util.NestedServletException: Request processing failed; nested ex
就是两个注解的使用@RequestBody和@ResponseBody注解的使用,然后springmvc解析进行转换然后注入 例子: @RequestMapping("/...") public @ResponseBody Book queryBook(@RequestBody("bookVo") BookVo bookVo,@RequestBody("user") User user){ Book book = new Book(); ...