<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:jee="http://www.springframework.org/schema/jee"
	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/jee http://www.springframework.org/schema/jee/spring-jee-4.3.xsd">

	<jee:jndi-lookup id="dataSource" jndi-name="jdbc/tbmsdb" />

	<bean id="sessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
		<property name="dataSource" ref="dataSource" />
		<property name="packagesToScan" value="com.ffii" />
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.dialect">org.hibernate.dialect.MySQL57Dialect</prop>
				<!-- <prop key="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.CMTTransactionFactory</prop> -->
				<prop key="hibernate.max_fetch_depth">1</prop>
				<!-- <prop key="hibernate.default_batch_fetch_size">8</prop> -->
				<prop key="hibernate.show_sql">false</prop>
				<prop key="hibernate.format_sql">true</prop>
				<prop key="hibernate.bytecode.use_reflection_optimizer">true</prop>
				<!-- <prop key="hibernate.connection.useUnicode">true</prop> -->
				<!-- <prop key="hibernate.connection.characterEncoding">UTF-8</prop> -->
			</props>
		</property>
	</bean>

	<bean id="transactionManager" class="org.springframework.orm.hibernate5.HibernateTransactionManager">
		<property name="nestedTransactionAllowed" value="true" />
		<property name="sessionFactory" ref="sessionFactory" />
	</bean>

</beans>