1.spring mvc返回json数据,只需要返回一个java bean对象就行,只要这个java bean 对象实现了序列化serializeable
2.
@RequestMapping(value = { "/actor_details" }, method = { RequestMethod.POST }) @ResponseBody public ResultObject actorDetails(@RequestBody ActorDetailsRequest req) { logger.debug("查看{}主播信息", req.getAid()); if (req.getAid() == null || req.getAid().equals("null") || req.getAid().equals("")) { return new ResultObject(ResultCode.NULL_PARAM); } ActorAndUser result = actorServiceImpl.queryActorData(req.getAid()); return new ResultObject(result); }