<?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:aop="http://www.springframework.org/schema/aop"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:jee="http://www.springframework.org/schema/jee"
	xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:mvc="http://www.springframework.org/schema/mvc"
	xmlns:cache="http://www.springframework.org/schema/cache"
	xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
			http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
			http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
			http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
			http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
			http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
			http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-3.2.xsd">
			
    <context:property-placeholder location="/WEB-INF/properties/*.${eai.systemmode}.properties" />
	<bean id="messageSource"  class="org.springframework.context.support.ResourceBundleMessageSource">
        <property name="basename" value="message/LocaleMessage" />
        <property name="defaultEncoding" value="UTF-8" />
    </bean>
 
    <bean id="localeResolver" class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
        <property name="defaultLocale" value="ko" />
        <property name="cookieName"   value="emsCookie"></property>
        <property name="cookieMaxAge" value="1000000"></property>
    </bean>
    
    <bean id="localeMessage" class="com.eactive.eai.rms.common.spring.LocaleMessage">
		<constructor-arg ref="messageSource" />
	</bean>
	
<!-- 	JSP Use : <spring:message code="login.userId" />  -->
<!-- 	<bean id="messageSource" -->
<!-- 		class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> -->
<!-- 		<property name="basename" value="classpath:message/LocaleMessage" /> -->
<!-- 		<property name="defaultEncoding" value="UTF-8" /> -->
<!-- 	</bean> -->
	
  	<bean id="customizingAppInitializer"
		  class="com.eactive.eai.custom.CustomizingAppInitializer"/>
  	
  	<bean id="appInitializer" class="com.eactive.eai.rms.common.startup.AppInitializer">
		<property name="instName" value="${inst.Name}"/>
		<property name="tableOwner" value="${eai.tableowner}"/>
		<property name="systemMode" value="${eai.systemmode}"/>
		<property name="themeColor" value="${theme.color}"/>
		<property name="eaiDatasourceType" value="${eai.datasource.type}"/>
		<property name="drMode" value="${eai.drmode}"/>
	</bean>
<!--	<bean id="passwordEncoder"-->
<!--		  class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder" />-->
	<bean id="passwordEncoder"			class="org.springframework.security.crypto.password.StandardPasswordEncoder" />
	
	<!-- 광주은행 전용 PasswordEncoder -->
	<bean id="kjbSafedbPasswordEncoder"	class="com.eactive.ext.kjb.spring.KjbSafedbPasswordEncoder" />

  <import resource="applicationContext-datasource-${eai.datasource.type}.xml"/>
  <import resource="applicationContext-jdbc-${eai.datasource.type}.xml"/>
  <import resource="applicationContext-udpip.xml"/>
  <import resource="applicationContext-schedule-dynamic.xml"/>
  <import resource="applicationContext-jpa.xml"/>
  <import resource="applicationContext-audit.xml"/>
  <!-- import resource="applicationContext-schedule.xml"/-->

  <aop:aspectj-autoproxy/>
  <cache:annotation-driven />
  <context:spring-configured />
  <context:annotation-config />
</beans>
