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

	<mvc:annotation-driven />

	<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property name="locations">
			<list>
				<value>WEB-INF/app.properties</value>
			</list>
		</property>
	</bean>

	<bean class="org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor" />

	<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
		<property name="defaultEncoding" value="UTF-8" />
	</bean>

	<bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
		<property name="templateLoaderPath" value="${freemarker.template.home}"/>
		<property name="defaultEncoding" value="UTF-8" />
	</bean>

	<bean id="freeMarkerViewResolver" class="com.ffii.core.web.view.freemarker.FreeMarkerViewResolver">
		<property name="exposeSessionAttributes" value="true" />
		<property name="requestContextAttribute" value="rc" />
	</bean>

	<bean id="messageSource" class="com.ffii.core.i18n.support.JdbcMessageSource">
		<property name="useCodeAsDefaultMessage" value="true" />
	</bean>

	<bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
		<property name="defaultLocale" value="en_US" />
	</bean>

<!--
	<bean id="exceptionResolver" class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
		<property name="defaultErrorView" value="error/error" />
		<property name="defaultStatusCode" value="200" />
		<property name="warnLogCategory" value="warnLogger" />
		<property name="exceptionMappings">
			<props>
				<prop key="CannotAcquireLockException">error/lockError</prop>
				<prop key="DataAccessException">error/daoError</prop>
				<prop key="ServletRequestBindingException">error/paramsError</prop>
				<prop key="AccessDeniedException">error/deniedError</prop>
				<prop key="InformationException">error/infoError</prop>
			</props>
		</property>
	</bean>
-->

	<import resource="dataSource.xml" />
	<import resource="dao.xml" />

	<import resource="security.xml" />

	<import resource="mail.xml" />

	<import resource="services.xml" />

</beans>