spring版本:4.2.5.RELEASE 查看“org.springframework.http.converter.StringHttpMessageConverter”源码,中有一段说明: By ;&#;&#;}), and writes with a {@code Content-Type} of {@code text/plain}. This can be overridden by setting the {@link #setSupportedMediaTypes sup
最近在重温JavaWeb基础内容,碰到了之前也时常遇到的中文乱码问题,想着反正是经常要处理的,不如当即就把它整理出来放在博客里,省得遇到时再去到处搜. 1. Post请求乱码的解决方案: 手工创建一个过滤器实现javax.servlet.Filter接口: public class CharacterEncodingFilter implements Filter { @Override public void init(FilterConfig filterConfig) throws Ser