Loading

spring 通过设置过滤器 解决请求参数乱码问题

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         version="3.1">
    <filter>
        <filter-name>CharacterEncodingFilter</filter-name>
        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
        <init-param>
            <param-name>encodeing</param-name>
            <param-value>utf-8</param-value>
        </init-param>
    </filter>
<web-app/>
posted @ 2022-09-17 22:00  冰莫莫  阅读(18)  评论(0编辑  收藏  举报