public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
HttpServletRequest req= (HttpServletRequest) servletRequest;
HttpServletResponse resp= (HttpServletResponse) servletResponse;
req.setCharacterEncoding("utf-8");
resp.setContentType("text/html;charset=utf-8");
filterChain.doFilter(req,resp);
}
过滤器filter
最新推荐文章于 2023-04-28 11:04:30 发布