SPRING

Spring 인자 외국어(한글) 처리 필터(web.xml)

개발자 배찌 2021. 6. 7. 19:39
728x90
<!-- 한글 encoding filter -->
<filter>
     <filter-name>CharacterEncodingFilter</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>
     
     <init-param>
         <param-name>forceEncoding</param-name>
         <param-value>true</param-value>
     </init-param>
</filter>

<filter-mapping>
     <filter-name>CharacterEncodingFilter</filter-name>
      <url-pattern>/*</url-pattern>
</filter-mapping>