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

	<!-- 웹응용프로그램의 루트 경로를 얻기 위한 유틸리티 빈입니다. -->
	<bean id="servletContextAware" class="devpia.dextuploadnj.support.spring.DEXTUploadNJServletContextAwareBean" />

	<!-- DEXTUploadNJ 환경 설정 값을 갖는 빈을 생성합니다. -->
	<bean id="dextuploadnjEnvironment" class="devpia.dextuploadnj.Environment">
		<!-- 절대 경로는 <property name="tempRepository" value="절대경로"> -->
		<property name="tempRepository">
			<bean factory-bean="servletContextAware" factory-method="getRealPath">
				<!-- 웹 애플리케이션 루트/files/data/style24/temp 디렉터리를 임시 디렉터리로 설정합니다. -->
				<constructor-arg value="/files/data/style24/dext/temp" />
			</bean>
		</property>
		<!-- 절대 경로는 <property name="defaultRepository" value="/files/attach"> -->
		<property name="defaultRepository">
			<bean factory-bean="servletContextAware" factory-method="getRealPath">
				<!-- 웹 애플리케이션 루트/files/data/style24/attach 디렉터리를 기본 저장 디렉터리로 설정합니다. -->
				<constructor-arg value="/files/data/style24/dext/attach" />
			</bean>
		</property>
		<property name="autoMakingDirectory" value="true" />
		<property name="licenseFilePath">
			<bean factory-bean="servletContextAware" factory-method="getRealPath">
				<constructor-arg value="classpath:dextupload/dextuploadnj.config" />
			</bean>
		</property>
	</bean>

	<!-- 파일 업로드 처리를 위해 DEXTUploadNJMultipartResolver를 선언합니다. -->
	<bean id="multipartResolver" class="devpia.dextuploadnj.support.spring.DEXTUploadNJMultipartResolver">
		<property name="environment" ref="dextuploadnjEnvironment" />
	</bean>

</beans>