(Spring + JSP + jQuery-AJAX + JSON ) setting environment for UTF-8 issue?

前端 未结 3 1770
盖世英雄少女心
盖世英雄少女心 2021-02-20 14:21

I am doing a chat project in java with Spring 3.x which needs Multi-language support.

Here is what I have done.

3条回答
  •  半阙折子戏
    2021-02-20 14:43

    Can you try using produces = "text/plain;charset=UTF-8" in the @RequestMapping

    @RequestMapping(value = "/test", method = POST, produces = "text/plain;charset=UTF-8")
        public @ResponseBody
    

    also check this: UTF-8 encoding problem in Spring MVC

提交回复
热议问题