日期:2014-05-17 浏览次数:20976 次
<!-- TransactionManager -->
<bean id="hibTransactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<tx:advice id="txAdvice" transaction-manager="hibTransactionManager">
<tx:attributes>
<tx:method name="add*" propagation="REQUIRED" />
<tx:method name="del*" propagation="REQUIRED" />
<tx:method name="update*" propagation="REQUIRED" />
<tx:method name="select*" propagation="REQUIRED"/>
<tx:method name="search*" propagation="REQUIRED"/>
<tx:method name="insert*" propagation="REQUIRED" />
<tx:method name="do*" propagation="REQUIRED" />
<tx:method name="*" propagation="SUPPORTS" read-only="true" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut expression="execution(* biz.*.*(..))"
id="bizMethods" />
<aop:advisor advice-ref="txAdvice" pointcut-ref="bizMethods" />
</aop:config>
<!--
********************************我是很长的分割线********************************
-->
<!-- Dao -->
<bean id="petDiaryDao" class="dao.impl.hib.PetDiaryDaoHibImpl">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="petInfoDao" class="dao.impl.hib.PetInfoDaoHibImpl">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<!--
********************************我是很长的分割线********************************
-->
<!-- Biz -->
<bean id="petDiaryBizTarget" class="biz.impl.PetDiaryBizImpl">
<property name="petDiaryDao" ref="petDiaryDao" />
</bean>
<bean id="petInfoBizTarget" class="impl.PetInfoBizImpl">
<property name="petInfoDao" ref="petInfoDao" />
</bean>
<!--
********************************我是很长的分割线********************************
-->
<!-- Advice -->
<bean id="lotteryAdvice" class="advice.LotteryAdvice">
<property name="petInfoBiz" ref="petInfoBizTarget" />
</bean>
<bean id="petInfoBiz" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces" value="biz.PetInfoBiz" />
<property name="interceptorNames" value="lotteryAdvice" />
<property name="target" ref="petInfoBizTarget" />
</bean>
<bean id="petDiaryBiz" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="ProxyInterfaces" value="biz.PetDiaryBiz" />
<property name="interceptorNames" value="lotteryAdvice" />
<property name="target" ref="petDiaryBizTarget" />
</bean>
推荐阅读更多>
-
哪位高手能告诉小弟我struct,spring,hibernate到底是什么
-
请问struts标签怎么整合html和js
-
exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
-
struts2b标签<s:textarea>根据action里传过来的值,设置可编辑或不可编辑
-
请前辈帮小弟我看看 这些专业都学什么 将来干什么
-
刚刚想起了一个有关问题,思来想去还是没想明白,求大神解释
-
Text限制有关问题
-
懂 hibernate 的进…该如何处理
-
jsp怎么让一个类文件里的变量接收JSP页面中表单值
-
救助一个简单的java有关问题
-
用IO库把一个大的txt文件变成若干个小的文件解决思路
-
myeclipse data explorer 不能连接oracle,该如何解决
-
jsp中文乱码有关问题
-
hashmap的get方法得到的值为空,该如何处理
-
jsp中怎么获取非本机的准确时间
-
java读取数据库到excel表格,该怎么处理
-
关于最简单的正则表达式解决方案
-
请教怎么删除arrayList中的重复的值
-
配备mysql数据库驱动程序
-
请教怎么设置JButton生成按钮的大小