SpringMVC解决中文乱码

在web.xml中配置

<filter>
    <filter-name>encoding</filter-name>
    <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
    <init-param>
        <param-name>encoding</param-name>
        <param-value>utf-8</param-value>
    </init-param>
</filter>
    <filter-mapping>
        <filter-name>encoding</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
上一篇:冰河教你一次性成功安装K8S集群(基于一主两从模式)


下一篇:JetBrains IDE系列常用设置