forked from chenhaoxiang/Java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbeans.xml
More file actions
22 lines (21 loc) · 1.2 KB
/
beans.xml
File metadata and controls
22 lines (21 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?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:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd">
<bean id="studDao" class="cn.hncu.stud.dao.StudDaoJdbc">
<!--ref="dataSource",引用applicationContext.xml中的dataSource -->
<property name="dataSource" ref="dataSource"></property>
</bean>
<bean id="bookDao" class="cn.hncu.stud.dao.BookDaoJdbc">
<!--ref="dataSource",引用applicationContext.xml中的dataSource -->
<property name="dataSource" ref="dataSource"></property>
</bean>
<bean id="saveService" class="cn.hncu.stud.service.SaveServiceImpl">
<property name="studDao" ref="studDao"></property>
<property name="bookDao" ref="bookDao"></property>
</bean>
</beans>