日期:2014-05-17 浏览次数:20881 次
<!-- 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前台开发,该如何解决
- 关于生命周期及作用域有关问题
- java.lang.NumberFormatException: For input string: "id"该如何处理
- 关于表的级联操作,该如何处理
- jsp页面对JavaBean中get()函数进行迭代输出 怎么处理
- 请教小弟我用了System.arraycopy,要import什么呀
- JTable cell编辑颜色、文本解决办法
- java文件下载(求解)解决方法
- JSP获取IP所属城市,该如何处理
- 这个sql查询语句,转为HQL语句,如何写
- JTable中的密码项怎么设置成*
- !在做servlet测试的时候发生异常,抛出错误,内详,多谢
- 《Real World Java EE Patterns》翻阅笔记 01:服务门面
- JSP网页里是charset=UTF-8,Mysql5里存取的数据库的charset也设成了UTF-8,可为什么通过JSP网页存取中文还是显示乱码
- 网站如何集成和支持markdown格式文件
- 哪位高手有ssh2能部署到jboss5中的项目源码
- 多线程操作vector有关问题?求高手
- 【散分】春光尚好,人间寂寥
- 对于JSP/STRUTS工作机会