日期:2014-05-17 浏览次数:20899 次
<!-- 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>
![]()
推荐阅读更多>
- 网页中是否有一种对象可以用来显示HTML字符串?该如何处理
- Tomcat 5.5 不需要装配 Java 吗?
- java有什么步骤可以存储List<String>
- ●簡答題●Tomcat+sql2000+jsp+IIs關於網站的問題?
- 高分求求解!数据源的有关问题
- 刚接触spring,有一点javaEE基础,推荐下学习资料解决方案
- Eclipse+Spring出现javax.servlet.ServletException: Servlet.init().异常
- 今天是软件工程师节
- 在win下能解析的xml,到了liunx就不行了,该怎么解决
- 会员管理模块数据库设计有关问题
- 哪位高手能给小弟我个使用scope="request"的例子
- 集合报空指针 当集合为空时如何样让程序继续正确运行
- 关于struts2自带例子blank的几个问题
- jsp中的sql语句执行的有关问题
- 大神:类似于淘宝发布商品那种功能
- 线程同步的解决思路
- 正则表达式求教解决办法
- 出现异常500,请教有关问题出在哪儿
- java执行多条sql语句的有关问题
- iterator 循环 tr td 怎么循环成3行4列有代码