public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException {
        if (ignore || (request.getCharacterEncoding() == null)) { //如果为空先从web.xml中得到
            String encoding = selectEncoding(request);
            if (encoding != null){
                request.setCharacterEncoding(encoding); //设置字符集编码
            }
        }
        chain.doFilter(request, response);
    }