springmvc返回json字符串中文乱码 (1)

@RequestMapping(value="menuTreeAjax", produces = "application/json; charset=utf-8")
    @ResponseBody
    /**
     * 根据parentMenuId获取菜单的树结构
     * @param parentMenuId
     * @return
     */
    public String menuTreeAjax(Integer parentMenuId) {
        JSONArray array = menuService.getTreeMenuByParentMenuId(parentMenuId);
        return array.toString();
    }

 

posted @ 2021-01-06 17:35  JpfBlog  阅读(27)  评论(0编辑  收藏  举报