<?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:p="http://www.springframework.org/schema/p" 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-2.5.xsd
           http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">

	<!-- HibernateDaoSupport类要求注入hibernateTemplate或sessionFactory属性 -->
	<bean name="baseDao" class="com.zds.slms.common.BaseDao">
		<property name="sessionFactory" ref="sessionFactory"></property>
	</bean>
	<!-- 客户档案配置 -->
	<bean name="clientDao" class="com.zds.slms.dao.ClientDao" parent="baseDao">
	</bean>
	<bean name="clientService" class="com.zds.slms.service.ClientService">
		<property name="clientDao" ref="clientDao"></property>
	</bean>
	<bean name="clientAction" class="com.zds.slms.action.ClientAction"
		scope="prototype">
		<property name="clientService" ref="clientService"></property>
	</bean>
	<!-- 员工档案配置 -->
	<bean name="employeeDao" class="com.zds.slms.dao.EmployeeDao"
		parent="baseDao">
	</bean>
	<bean name="employeeService" class="com.zds.slms.service.EmployeeService">
		<property name="employeeDao" ref="employeeDao"></property>
	</bean>
	<bean name="employeeAction" class="com.zds.slms.action.EmployeeAction"
		scope="prototype">
		<property name="employeeService" ref="employeeService"></property>
	</bean>
	<!-- 商品档案配置 -->
	<bean name="merchandiseDao" class="com.zds.slms.dao.MerchandiseDao"
		parent="baseDao">
	</bean>
	<bean name="merchandiseService" class="com.zds.slms.service.MerchandiseService">
		<property name="merchandiseDao" ref="merchandiseDao"></property>
	</bean>
	<bean name="merchandiseAction" class="com.zds.slms.action.MerchandiseAction"
		scope="prototype">
		<property name="merchandiseService" ref="merchandiseService"></property>
	</bean>
	<!-- 订货单配置 -->
	<bean name="stockorderDao" class="com.zds.slms.dao.StockorderDao"
		parent="baseDao">
		<property name="clientDao" ref="clientDao"></property>
		<property name="employeeDao" ref="employeeDao"></property>
		<property name="merchandiseDao" ref="merchandiseDao"></property>
	</bean>
	<bean name="stockorderService" class="com.zds.slms.service.StockorderService">
		<property name="stockorderDao" ref="stockorderDao"></property>
	</bean>
	<bean name="stockorderAction" class="com.zds.slms.action.StockorderAction"
		scope="prototype">
		<property name="stockorderService" ref="stockorderService"></property>
		<property name="clientService" ref="clientService"></property>
		<property name="employeeService" ref="employeeService"></property>
		<property name="merchandiseService" ref="merchandiseService"></property>
	</bean>
	<!-- 进货单配置 -->
	<bean name="stockinDao" class="com.zds.slms.dao.StockinDao"
		parent="baseDao">
		<property name="clientDao" ref="clientDao"></property>
		<property name="employeeDao" ref="employeeDao"></property>
		<property name="merchandiseDao" ref="merchandiseDao"></property>
	</bean>
	<bean name="stockinService" class="com.zds.slms.service.StockinService">
		<property name="stockinDao" ref="stockinDao"></property>
	</bean>
	<bean name="stockinAction" class="com.zds.slms.action.StockinAction"
		scope="prototype">
		<property name="stockinService" ref="stockinService"></property>
		<property name="clientService" ref="clientService"></property>
		<property name="employeeService" ref="employeeService"></property>
		<property name="merchandiseService" ref="merchandiseService"></property>
	</bean>
</beans>
