controller 返回中文是乱码处理

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wanggeying/article/details/84334287

需添加:produces = "text/plain;charset=UTF-8"

伪代码如下:

    @RequestMapping(value = "xmglGgTg", produces = "text/plain;charset=UTF-8")
    public String xmglGgTg(HttpServletRequest req) throws Exception {
        // 登录信息
        ActivePerson activePerson = ActivePersonManager.getActivePerson();
 

猜你喜欢

转载自blog.csdn.net/wanggeying/article/details/84334287
今日推荐