applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" -->
<!--" http://www.springframework.org/dtd/spring-beans.dtd"> -->

<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-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd">

<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="configLocation">
<value>classpath:hibernate.cfg.xml</value>
</property>
</bean>
<bean id="st" class="org.jb.aop.St"></bean>
<bean id="tm" class="org.jb.common.Tm"></bean>
<bean id="authImpl" class="org.jb.aop.AuthImpl"></bean>
<aop:config>
<aop:aspect ref="authImpl">
<aop:pointcut
expression="execution(* org.jb.t309.team5.web.action.*.execute(..))"
id="pc" />
<aop:before method="authPermission" pointcut-ref="pc" />
</aop:aspect>
</aop:config>
<bean id="myHibTxManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<tx:advice id="txAdvice" transaction-manager="myHibTxManager">
<tx:attributes>
<!-- 对get/load/search开头的方法要求只读事务 -->
<tx:method name="get*" propagation="SUPPORTS"
read-only="true" />
<tx:method name="load*" propagation="SUPPORTS"
read-only="true" />
<tx:method name="search*" propagation="SUPPORTS"
read-only="true" />
<tx:method name="find*" propagation="SUPPORTS"
read-only="true" />
<!-- 对其它方法要求事务 -->
<tx:method name="*" propagation="REQUIRED" />
</tx:attributes>
</tx:advice>
<aop:config>
<!--
只对GoodsBiz添加事务支持,因为前面配置的transactionManager
是专对Hibernate的事务管理器 。
-->
<aop:pointcut id="serviceMethods"
expression="execution(* org.jb.t309.team5.biz.impl.*.*(..))" />
<!-- 织入 -->
<aop:advisor advice-ref="txAdvice"
pointcut-ref="serviceMethods" />
</aop:config>


<!-- 1. DAO -->
<bean id="commonDAO"
class="org.jb.common.dao.hibimpl.CommonDAOHibImpl">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>

<!-- 用户相关user -->
<bean id="userDAO" class="org.jb.t309.team5.dao.impl.UserDAOHibImpl"
parent="commonDAO">
</bean>
<bean id="userBiz"
class="org.jb.t309.team5.biz.impl.UserBizHibImpl">
<property name="userDAO" ref="userDAO"></property>
</bean>
<bean name="/user"
class="org.jb.t309.team5.web.action.UserAction" autowire="byType">
</bean>
<!-- 角色相关role -->
<bean id="roleDAO" class="org.jb.t309.team5.dao.impl.RoleDAOHibImpl"
parent="commonDAO">
</bean>
<bean id="roleBiz"
class="org.jb.t309.team5.biz.impl.RoleBizHibImpl">
<property name="roleDAO" ref="roleDAO"></property>
</bean>
<bean name="/role"
class="org.jb.t309.team5.web.action.RoleAction">
<property name="roleBiz" ref="roleBiz"></property>
</bean>

<!-- cstActivity相关 -->
<bean id="cstActivityDao"
class="org.jb.t309.team5.dao.impl.CstActivityDAOHibImpl"
parent="commonDAO">
</bean>
<bean id="cstActivityBiz"
class="org.jb.t309.team5.biz.impl.CstActivityBizHibImpl">
<property name="cstActivityDAO" ref="cstActivityDao"></property>
</bean>
<bean name="/activity"
class="org.jb.t309.team5.web.action.ActivityAction"
autowire="byType">
</bean>

<!-- 客户相关customer -->
<bean id="customerDAO"
class="org.jb.t309.team5.dao.impl.CstCustomerDAOHibImpl"
parent="commonDAO">
</bean>
<bean id="customerBiz"
class="org.jb.t309.team5.biz.impl.CstCustomerBizHibImpl"
autowire="byType">
</bean>
<bean name="/customer"
class="org.jb.t309.team5.web.action.CustomerAction"
autowire="byType">
</bean>

<!-- 机会相关chance -->
<bean id="chanceDAO"
class="org.jb.t309.team5.dao.impl.SalChanceDAOHibImpl"
parent="commonDAO">
</bean>
<bean id="chanceBiz"
class="org.jb.t309.team5.biz.impl.SalChanceBizHibImpl">
<property name="salChanceDAO" ref="chanceDAO"></property>
</bean>
<bean name="/chance"
class="org.jb.t309.team5.web.action.ChanceAction">
<property name="salChanceBiz" ref="chanceBiz"></property>
<property name="userBiz" ref="userBiz"></property>
</bean>

<!-- 数据字典相关dict -->
<bean id="dictDAO"
class="org.jb.t309.team5.dao.impl.BaseDictDAOHibImpl"
parent="commonDAO">
</bean>
<bean id="dictBiz"
class="org.jb.t309.team5.biz.impl.BaseDictBizHibImpl">
<property name="basDictDAO" ref="dictDAO"></property>
</bean>
<bean name="/dict" class="org.jb.t309.team5.web.action.DictAction"
autowire="byType">

</bean>

<!-- 计划相关plan -->
<bean id="planDAO"
class="org.jb.t309.team5.dao.impl.SalPlanDAOHibImpl"
parent="commonDAO">
</bean>
<bean id="planBiz"
class="org.jb.t309.team5.biz.impl.SalPlanBizHibImpl"
autowire="byType">
</bean>
<bean name="/plan" class="org.jb.t309.team5.web.action.PlanAction"
autowire="byType">
</bean>
<!-- 联系人相关linkman -->
<bean id="linkmanDao"
class="org.jb.t309.team5.dao.impl.CstLinkmanDAOHibImpl"
parent="commonDAO">
</bean>
<bean id="cstLinkmanBiz"
class="org.jb.t309.team5.biz.impl.CstLinkmanBizHibImpl">
<property name="linkmanDao" ref="linkmanDao"></property>
</bean>
<bean name="/cstLinkman"
class="org.jb.t309.team5.web.action.CstLinkmanAction">
<property name="cstLinkmanBiz" ref="cstLinkmanBiz"></property>
<property name="customerBiz" ref="customerBiz"></property>
</bean>

<!-- 服务相关service -->
<bean id="serviceDao"
class="org.jb.t309.team5.dao.impl.CstServiceDAOHibImpl"
parent="commonDAO">
</bean>
<bean id="serviceBiz"
class="org.jb.t309.team5.biz.impl.CstServiceBizHibImpl">
<property name="serviceDao" ref="serviceDao"></property>
</bean>
<bean name="/service"
class="org.jb.t309.team5.web.action.ServiceAction">
<property name="serviceBiz" ref="serviceBiz"></property>
<property name="userBiz" ref="userBiz"></property>
<property name="customerBiz" ref="customerBiz"></property>
<property name="dictBiz" ref="dictBiz"></property>
</bean>

<!-- 历史订单 history order -->
<bean id="vOrdersDao"
class="org.jb.t309.team5.dao.impl.VOrdersDAOHibImpl"
parent="commonDAO">
</bean>
<bean id="vOrdersBiz"
class="org.jb.t309.team5.biz.impl.VOrdersBizHibImol"
autowire="byType">
</bean>
<bean name="/orders"
class="org.jb.t309.team5.web.action.OrdersAction" autowire="byType">
</bean>
<!-- 客户服务分析 -->
<bean name="/svrRpt"
class="org.jb.t309.team5.web.action.SvrRptAction">
<property name="serviceBiz" ref="serviceBiz"></property>
</bean>
<!-- 产品信息product -->
<bean id="poductDAO"
class="org.jb.t309.team5.dao.impl.ProductDAOHibImpl"
parent="commonDAO">
</bean>
<bean id="productBiz"
class="org.jb.t309.team5.biz.impl.ProductBizHibImpl"
autowire="byType">
</bean>
<bean name="/product"
class="org.jb.t309.team5.web.action.ProductAction"
autowire="byType">
</bean>

<!-- 定时间检查 -->
<bean id="lostDao"
class="org.jb.t309.team5.dao.impl.CstLostDAOHibImpl"
parent="commonDAO">
</bean>
<bean id="lostBiz"
class="org.jb.t309.team5.biz.impl.CstLostBizHibImpl"
autowire="byType">
</bean>
<bean name="/lost" class="org.jb.t309.team5.web.action.LostAction"
autowire="byType">
</bean>
<!-- 客户贡献分析 -->
<bean name="/contrRpt" class="org.jb.t309.team5.web.action.ContrRptAction" autowire="byType">
</bean>

<bean id="jobLost"
class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
<property name="targetObject" ref="lostBiz"></property>
<property name="targetMethod" value="checkLost"></property>
</bean>

<bean id="cron"
class="org.springframework.scheduling.quartz.CronTriggerBean">
<property name="jobDetail" ref="jobLost"></property>
<property name="cronExpression">
<value>0 30 2 ? * SAT</value>
</property>
</bean>

<bean autowire="no"
class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="cron" />
</list>
</property>
</bean>
<!-- 客户流失分析 -->
<bean name="/lostRpt"
class="org.jb.t309.team5.web.action.LostRptAction"
autowire="byType">
</bean>

<!-- 客户构成分析 -->
<bean name="/consRpt"
class="org.jb.t309.team5.web.action.ConsRptAction"
autowire="byType">
</bean>

<!-- 库存查询 -->
<bean id="storageDAO" class="org.jb.t309.team5.dao.impl.VStorageDAOHibImpl" parent="commonDAO"></bean>
<bean id="storageBiz" class="org.jb.t309.team5.biz.impl.VStorageBizHibImpl" autowire="byType"></bean>
<bean name="/storage" class="org.jb.t309.team5.web.action.StorageAction" autowire="byType"></bean>

<!-- 详细权限相关 -->
<bean id="detailRoleDAO" class="org.jb.t309.team5.dao.impl.DetailRoleDAOHibImpl" parent="commonDAO"></bean>
<bean id="detailRoleBiz" class="org.jb.t309.team5.biz.impl.DetailRoleBizHibImpl" autowire="byType"></bean>
<bean name="/detailRole" class="org.jb.t309.team5.web.action.DetailRoleAction" autowire="byType"></bean>
</beans>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值