<beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc"
	xmlns:p="http://www.springframework.org/schema/p" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:util="http://www.springframework.org/schema/util"
	xmlns:task="http://www.springframework.org/schema/task"
	xsi:schemaLocation="
	http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd         
	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd         
	http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
	http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd
	http://www.springframework.org/schema/task 
	http://www.springframework.org/schema/task/spring-task.xsd
	">

	<util:properties id="prop" location="classpath:/config/properties/globals.properties" />

	<mvc:annotation-driven />
	<mvc:default-servlet-handler/>

	<context:component-scan base-package="kr.co.jinwoosi.clfd">
		<context:include-filter expression="org.springframework.stereotype.Controller" type="annotation" />
		<context:exclude-filter expression="org.springframework.stereotype.Service" type="annotation" />
		<context:exclude-filter expression="org.springframework.stereotype.Repository" type="annotation" />
	</context:component-scan>
	
	<bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
		<property name="definitions">
			<list>
				<value>/WEB-INF/config/tiles/*.xml</value>
			</list>
		</property>
	</bean>
	<bean id="tilesViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver" p:order="0"
		p:viewClass="org.springframework.web.servlet.view.tiles3.TilesView" />

	<!-- @ResponseBody 를 지원하기 위한 JSON MessageConverter -->
	<bean id="jacksonMessageConverter" class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
		<property name="supportedMediaTypes">
			<list>
				<value>text/json;charset=UTF-8</value>
			</list>
		</property>
	</bean>
	<!-- ReqeustMapping 과 Controller 클래스 매핑을 위한 mvc 설정 -->
	<!-- -->
	<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
		<property name="messageConverters">
			<list>
				<ref bean="jacksonMessageConverter" />
			</list>
		</property>
	</bean>

	<!-- 파일 업로드를 위한 Multi Part 설정 -->
	<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" />

 	<mvc:interceptors>
		<mvc:interceptor>
			<mvc:mapping path="/system/**/*.mng" />
			<mvc:mapping path="/system/**/*.json"/>
			<mvc:exclude-mapping path="/login/*" />
			<mvc:exclude-mapping path="/error/*" />
			<mvc:exclude-mapping path="/system/user/mypage.mng" />
			<mvc:exclude-mapping path="/system/webLog/*" />
			<bean class="kr.co.jinwoosi.clfd.framework.weblog.interceptor.WebLogInterceptor" />
		</mvc:interceptor>
	</mvc:interceptors>
	
	<!-- 언어 설정 -->
	<bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
		<property name="defaultLocale" value="ko" />
	</bean>
	<mvc:interceptors>
    	<bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
    		<property name="paramName" value="locale" />
    	</bean>
	</mvc:interceptors>
	
	<context:component-scan base-package="kr.co.jinwoosi.clfd.conts.sns.web.SnsScheduler" />
	<task:scheduler id="jobScheduler" pool-size="10" />
	<task:annotation-driven scheduler="jobScheduler" />

</beans>