본문 바로가기

Language/Java, Android

[스프링] 한글깨짐 web.xml 필터

<!-- UTF-8 -->

<filter>

        <filter-name>encodingFilter</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>encodingFilter</filter-name>

        <url-pattern>/*</url-pattern>

</filter-mapping>



>> web.xml에 추가해주면 된다.