<?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:jpa="http://www.springframework.org/schema/data/jpa"
	xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="
            http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
            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/jee http://www.springframework.org/schema/jee/spring-jee.xsd
            http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
            http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
            http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
            http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
            ">

	<import resource="applicationContext-jpa.xml" />

	<context:component-scan
		base-package="com.eactive.kakao.rolling" />

	<bean id="entityManagerFactory" primary="true"
		class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
		<property name="dataSource" ref="dataSource"></property>
		<property name="packagesToScan"
			value="com.eactive.eai.data,com.eactive.kakao.rolling"></property>
		<property name="jpaVendorAdapter">
			<bean
				class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"></bean>
		</property>
		<property name="jpaProperties" ref="hibernateProperties"></property>
		<property name="jpaPropertyMap">
			<map>
				<entry key="hibernate.ejb.interceptor">
					<bean class="com.eactive.kakao.rolling.impl.RollingTableInterceptorImpl" />
				</entry>
			</map>
		</property>
	</bean>
	
	<bean class="com.eactive.kakao.rolling.impl.TableSuffixResolverImpl"></bean>

	<jpa:repositories
		transaction-manager-ref="transactionManager"
		entity-manager-factory-ref="entityManagerFactory"
		base-package="com.eactive.eai,com.eactive.kakao.rolling"
		base-class="com.eactive.eai.data.jpa.BaseRepositoryImpl"></jpa:repositories>

</beans>