<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:p="http://www.springframework.org/schema/p"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:mvc="http://www.springframework.org/schema/mvc"
	xmlns:aop="http://www.springframework.org/schema/aop"
	xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
		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/aop http://www.springframework.org/schema/aop/spring-aop-4.3.xsd">

	<context:component-scan base-package="com">
		<context:include-filter type="annotation"	expression="org.springframework.stereotype.Controller" />
		<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service" />
		<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Repository" />
	</context:component-scan>

	<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping" p:order="0" />
	<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">
		<property name="messageConverters">
			<list>
				<bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" />
				<bean class="org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter">
					<property name="supportedMediaTypes">
						<list>
							<value>*/*;charset=UTF-8</value>
						</list>
					</property>
				</bean>
			</list>
		</property>
	</bean>

	<!-- For Pagination Tag -->
	<bean id="imageRenderer"
			class="com.mca.util.ImgPaginationRenderer" />

	<bean id="paginationManager"
		class="egovframework.rte.ptl.mvc.tags.ui.pagination.DefaultPaginationManager">
		<property name="rendererType">
			<map>
				<entry key="image" value-ref="imageRenderer" />
			</map>
		</property>
	</bean>
	<!-- /For Pagination Tag -->

	<mvc:view-controller path="/cmmn/validator.do" view-name="cmmn/validator" />


	<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView" id="jsonView" />
	<bean
		class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
		<property name="supportedMediaTypes">
			<list>
				<value>text/plain;charset=UTF-8</value>
				<value>text/html;charset=UTF-8</value>
				<value>application/json;charset=UTF-8</value>
			</list>
		</property>
	</bean>
	
	   <!-- 

    <mvc:annotation-driven/>

     -->

	<mvc:annotation-driven content-negotiation-manager="contentNegotiationManager" />
	<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
		<property name="favorPathExtension" value="false" />
		<property name="favorParameter" value="true" />
		<property name="mediaTypes">
			<value>
				json=application/json
				xml=application/xml
			</value>
		</property>
	</bean>


  <bean class="org.springframework.web.servlet.view.UrlBasedViewResolver" id="viewResolver">
    <property name="order" value="1"/>
    <property name="viewClass" value="org.springframework.web.servlet.view.tiles3.TilesView"/>
  </bean>

  <bean class="org.springframework.web.servlet.view.tiles3.TilesConfigurer" id="tilesConfigurer">
    <property name="definitions">
      <list>
        <value>/WEB-INF/tiles/tiles.xml</value>
      </list>
    </property>
  </bean>

  <bean class="org.springframework.web.servlet.view.UrlBasedViewResolver">
    <property name="order" value="2"/>
    <property name="prefix" value="/WEB-INF/jsp/"/>
    <property name="suffix" value=".jsp"/>
    <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
  </bean>

  <mvc:resources mapping="/css/**" location="/css/" />
  <mvc:resources mapping="/images/**" location="/images/" />
  <mvc:resources mapping="/js/**" location="/js/" />
  <mvc:resources mapping="/fonts/**" location="/fonts/" />

</beans>