|
|
|
@ -22,6 +22,7 @@
|
|
|
|
|
http://www.springframework.org/schema/task/spring-task-3.0.xsd">
|
|
|
|
|
|
|
|
|
|
<!-- 读取db.properties中的属性值 -->
|
|
|
|
|
|
|
|
|
|
<bean
|
|
|
|
|
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
|
|
|
|
<property name="location" value="WEB-INF/config/config.properties"></property>
|
|
|
|
@ -40,13 +41,29 @@
|
|
|
|
|
<property name="username" value="${jdbc.mysql.username}" />
|
|
|
|
|
<property name="password" value="${jdbc.mysql.password}" />
|
|
|
|
|
</bean>
|
|
|
|
|
<!-- <bean id="mySQLSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
|
|
|
|
|
<property name="configLocation" value="WEB-INF/config/mybatis-applicationConfig.xml" />
|
|
|
|
|
<property name="dataSource" ref="mySQLDataSource" />
|
|
|
|
|
</bean> -->
|
|
|
|
|
<bean id="mySQLSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
|
|
|
|
|
<property name="configLocation" value="WEB-INF/config/mybatis-applicationConfig.xml" />
|
|
|
|
|
<property name="dataSource" ref="mySQLDataSource" />
|
|
|
|
|
<property name="mapperLocations">
|
|
|
|
|
<list>
|
|
|
|
|
<value>classpath:com/dao/mapper/*apper.xml</value>
|
|
|
|
|
</list>
|
|
|
|
|
</property>
|
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
|
|
<!-- mapper扫描器 -->
|
|
|
|
|
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
|
|
|
|
|
<property name="basePackage" value="com.platform.dao,com.dao.mapper" />
|
|
|
|
|
<!-- 扫描包路径,如果需要扫描多个包,中间使用半角逗号隔开 -->
|
|
|
|
|
<property name="basePackage" value="com/platform/dao"></property>
|
|
|
|
|
<property name="sqlSessionFactoryBeanName" value="mySQLSessionFactory" />
|
|
|
|
|
</bean>
|
|
|
|
|
<!-- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
|
|
|
|
|
<property name="basePackage" value="com.platform.dao" />
|
|
|
|
|
</bean> -->
|
|
|
|
|
<!-- 配置声明式事物 事物管理器 -->
|
|
|
|
|
<!-- 配置声明式事物 -->
|
|
|
|
|
<bean id="mySQLTxManager"
|
|
|
|
|