@ResponseBody 用来返回 json 等字符串。遇到返回中文时是乱码,可这样处理:
@RequestMapping( produces="text/plain; charset=UTF-8", value="/getUserName" )
其中 /getUserName 是路径名。
@ResponseBody 用来返回 json 等字符串。遇到返回中文时是乱码,可这样处理:
@RequestMapping( produces="text/plain; charset=UTF-8", value="/getUserName" )
其中 /getUserName 是路径名。