<?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:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
<!-- Message Source -->
<bean id="rootMessageSource"
class= "org.springframework.context.support.ReloadableResourceBundleMessageSource" >
<property name= "basenames">
<list>
<value>classpath:messages/core</value >
</list>
</property>
<property name="fileEncodings" value="UTF-8" />
<property name="defaultEncoding" value="UTF-8" />
</bean>
<bean
class= "org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" >
<property name= "locations">
<value>classpath:properties/mysql.properties</value >
</property>
</bean>
<bean id="dataSource"
class= "org.springframework.jdbc.datasource.SimpleDriverDataSource" >
<property name= "driverClass" value="${jdbc.driverClass}" />
<property name= "url" value ="${jdbc.url}" />
<property name= "username" value="${jdbc.username}" />
<property name= "password" value="${jdbc.password}" />
</bean>
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean" >
<property name= "dataSource" ref="dataSource" />
<property name= "mapperLocations" value="classpath:mybatis/mapper/**/*.xml" />
</bean>
<bean id="sqlSession" class="org.mybatis.spring.SqlSessionTemplate" >
<constructor-arg index= "0" ref="sqlSessionFactory" />
</bean>
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer" >
<property name= "basePackage" value="com.narratage.reserve" />
</bean>
<bean id="transactionManager"
class= "org.springframework.jdbc.datasource.DataSourceTransactionManager" >
<property name= "dataSource" ref="dataSource" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager" />
</beans>