<?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:mvc="http://www.springframework.org/schema/mvc" 
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="
	    http://www.springframework.org/schema/mvc
	    http://www.springframework.org/schema/mvc/spring-mvc.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/util 
        http://www.springframework.org/schema/util/spring-util-4.0.xsd
        ">

    <context:component-scan base-package="egovframework, nlib, cmm, kccf">
       <!-- <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" /> -->
    </context:component-scan>
    
    <context:annotation-config />

    <!-- NLIB PROPERTIES 추가 (DIGITALSHIP 2021.06.17) -->
    <util:properties id="properties" location="classpath:nlib/nlib.properties" />
    
	<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
		<property name="basenames">
			<list>
				<value>classpath:/egovframework/message/message-common</value>
				<value>classpath:/egovframework/rte/fdl/idgnr/messages/idgnr</value>
				<value>classpath:/egovframework/rte/fdl/property/messages/properties</value>
			</list>
		</property>
		<property name="cacheSeconds">
			<value>60</value>
		</property>
	</bean>
	
	<bean id="leaveaTrace" class="egovframework.rte.fdl.cmmn.trace.LeaveaTrace">
		<property name="traceHandlerServices">
			<list>
				<ref bean="traceHandlerService" />
			</list>
		</property>
	</bean>

	<bean id="traceHandlerService" class="egovframework.rte.fdl.cmmn.trace.manager.DefaultTraceHandleManager">
		<property name="reqExpMatcher">
			<ref bean="antPathMater" />
		</property>
		<property name="patterns">
			<list>
				<value>*</value>
			</list>
		</property>
		<property name="handlers">
			<list>
				<ref bean="defaultTraceHandler" />
			</list>
		</property>
	</bean>
	
	<bean id="antPathMater" class="org.springframework.util.AntPathMatcher" />
	<bean id="defaultTraceHandler" class="egovframework.rte.fdl.cmmn.trace.handler.DefaultTraceHandler" />

    <!-- global 프로퍼티 암호화 -->
    <bean id="environmentVariablesConfiguration" class="org.jasypt.encryption.pbe.config.EnvironmentStringPBEConfig">
        <property name="algorithm" value="PBEWithMD5AndDES" />
        <!-- <property name="passwordEnvName" value="APP_ENCRYPTION_PASSWORD" /> -->
    </bean>
    <bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
        <property name="config" ref="environmentVariablesConfiguration" />
        <property name="password" value="gdyYs/IZqY86VcWhT8emCYfqY1ahw2vtLG+/FzNqtrQ=" />
    </bean>
    
    <bean id="propertyConfig" class="org.jasypt.spring3.properties.EncryptablePropertyPlaceholderConfigurer">
        <constructor-arg ref="configurationEncryptor" />
        <property name="locations">
            <list>
                <value>classpath:/egovframework/egovProps/globals.properties</value>
            </list>
        </property>
    </bean> 
    
    <!-- MULTIPART RESOLVERS -->
    <!-- regular spring resolver -->
    <bean id="spring.RegularCommonsMultipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
        <property name="maxUploadSize" value="600000000" />
        <property name="maxInMemorySize" value="100000000" />
    </bean>
    <alias name="spring.RegularCommonsMultipartResolver" alias="multipartResolver" />

</beans>
