日期:2014-05-17 浏览次数:21290 次
<!-- 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>
推荐阅读更多>
-
java applet现下还值得学吗
-
连接FTP时报错,救!该怎么解决
-
Java Web整合开发王者归来(JSP+Servlet+Struts+Hibernate+Spring) 电子版 或者pdf邮箱:benbenfafa_88@,该如何处理
-
SWT菜单的显示有关问题
-
j2me如何实现类似正则表达式的功能,提取文中字符?
-
actionservlet 何时调用Action 的execute()方法,该如何解决
-
替很多JSP空间对Spring支持需要收费
-
document.getElementById("form1").onsubmit = check;是什么意思?解决办法
-
一个JS修改IE属性的有关问题
-
哪位高手帮小弟我写一段javascript,使实现把radio隐藏,并插入一个图片文件的功能
-
用JAVA编写类似QQ的网络聊天工具
-
Eclipse与oracle连接前要做哪些工作解决方案
-
javac编译时去哪里找class的,该怎么解决
-
浅析java中clone()方法,该如何处理
-
哥哥们,求教!文件下载,用户取消文件接受,报错误ClientAbortException
-
myeclipse-struts-the requested resources is available解决方案
-
[]哪位高手能给个后台线程的例子
-
java文件里有多个错误,用try-catch处理时有一段代码直接忽略了,调试时没有错误显示,如何改,求指教如何改
-
新手问有关问题
-
关于编码的有关问题