标签:连接池 drive www man oca frame 使用 beans nbsp
1 <?xml version="1.0" encoding="UTF-8"?>
2 <beans xmlns="http://www.springframework.org/schema/beans"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
5 xmlns:tx="http://www.springframework.org/schema/tx"
6 xsi:schemaLocation="http://www.springframework.org/schema/beans
7 http://www.springframework.org/schema/beans/spring-beans.xsd
8 http://www.springframework.org/schema/context
9 http://www.springframework.org/schema/context/spring-context.xsd
10 http://www.springframework.org/schema/tx
11 http://www.springframework.org/schema/tx/spring-tx.xsd">
12 <!--1.扫描service包下所有使用注解的类型 -->
13 <context:component-scan base-package="com.imooc.service"/>
14 <!-- 2.配置事物管理器 -->
15 <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
16 <!--3.注入数据库连接池 -->
17 <property name="dataSource" ref="dataSource"/>
18 </bean>
19 <!-- 4.配置基于注解的声明式事物 -->
20 <tx:annotation-driven transaction-manager="transactionManager"/>
21 </beans>
22
23
24
25
26
27
28
29
30
31
32
33
34
35
标签:连接池 drive www man oca frame 使用 beans nbsp
原文地址:https://www.cnblogs.com/shitulaoma/p/12393090.html