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