23 lines
1.0 KiB
Plaintext
23 lines
1.0 KiB
Plaintext
|
|
<?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:aop="http://www.springframework.org/schema/aop"
|
|||
|
|
xmlns:tx="http://www.springframework.org/schema/tx"
|
|||
|
|
xsi:schemaLocation="
|
|||
|
|
http://www.springframework.org/schema/beans
|
|||
|
|
http://www.springframework.org/schema/beans/spring-beans.xsd
|
|||
|
|
http://www.springframework.org/schema/tx
|
|||
|
|
http://www.springframework.org/schema/tx/spring-tx.xsd
|
|||
|
|
http://www.springframework.org/schema/aop
|
|||
|
|
http://www.springframework.org/schema/aop/spring-aop.xsd">
|
|||
|
|
|
|||
|
|
<!-- 配置spring的PlatformTransactionManager,名字为默认值 -->
|
|||
|
|
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
|||
|
|
<property name="dataSource" ref="dataSource" />
|
|||
|
|
</bean>
|
|||
|
|
|
|||
|
|
<!-- 开启事务控制的注解支持 -->
|
|||
|
|
<tx:annotation-driven transaction-manager="transactionManager"/>
|
|||
|
|
</beans>
|