1. 程式人生 > >controller 返回中文是亂碼處理

controller 返回中文是亂碼處理

需新增: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();