1. UTF-8 / 한글 인코딩 설정 추가

	<!-- UTF-8 / 한글 인코딩 설정 -->
	<filter>
	    <filter-name>encoding-filter</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>encoding-filter</filter-name>
	    <url-pattern>/*</url-pattern>
	</filter-mapping>

 

2. 스프링 웹 시큐리티(Spring Web Security) 설정

 

1) 상단 contextConfigLocation에 작성한 security-context.xml을 로딩하도록 설정

	<servlet>
		<servlet-name>appServlet</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
		<init-param>
			<param-name>contextConfigLocation</param-name>
			<param-value>
			/WEB-INF/spring/appServlet/servlet-context.xml 
			/WEB-INF/spring/security-context.xml
			</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>

2) 필터 추가

	<!-- 스프링 웹 시큐리티 관련 설정 -->
	<filter>
		<filter-name>springSecurityFilterChain</filter-name>
		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
	</filter>

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

 

 

 

 

+ Recent posts