日期:2014-05-17 浏览次数:20688 次
<!-- 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>
推荐阅读更多>
- 如何配置JSP服务器
- 求:javascript,如何让图片做为提交按钮啊
- 菜鸟java
- js刷新页面的有关问题
- 关于spring mvc的疑点
- org.hibernate.util.JDBCExceptionReporter,该如何处理
- 探索B/S架构思想,该如何解决
- SSH用户注册老掉牙报attempt to create saveOrUpdate event with null entity这个
- JAVA文本如何随窗体最大化变大而变大? (via TranXcode)
- i++ 跟++i
- java怎么读取一个文件夹下面的所有图片
- 使用JSP在自己的网站上制作万年历,该如何处理
- 这种新一代WEB 聊天工具是叫什么技术?小弟我知道是AJAX 不过他有服务器端拥有QQ一样的功能
- 关于jsp运行的有关问题啊!
- rmi中,服务器怎么向客户端发信息
- 请教这段代码能显示出图片吗
- 麻烦看一下这段程序的输出结果,待,多谢了
- servlet中怎么嵌套是否对话框
- HtmlUnit处理Javascript出现了有关问题
- hibernate中session.connection()这个步骤过期了