日期:2014-05-17 浏览次数:20678 次
<!-- 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>
推荐阅读更多>
- 开发网站过程中遇到的几个问题
- 新手求帮助,刚开始学习,select 里的onchange事件隐藏,该怎么解决
- 在win下能解析的xml,到了liunx就不行了,该怎么解决
- 在java中打印菱形,该怎么处理
- 咨询什么东东
- 怎么判断一个文件内是否包含某个人名呢
- 哪位高手有企业管理后台的页面模板
- 问一个进度条的有关问题
- 怎么获得项目经验
- Struts 二核心技术与Java EE框架整合开发实战
- 一个编程男孩的内心深处解决方案
- JSP访问数据库提示找不到数据源.解决方案
- google 地图 map有关问题
- 求帮助~struts 2.3.4 文件下传,FileName,ContentType和File全为NULL
- 哪位高手能解释一下java io里的字节流和字符流究竟有什么具体的区别
- rar文件怎么读出转换成byte[]
- 通过jsp向mysql插入图片并显示到页面的有关问题
- SOCKET发送HTTP请求,Servlet处理的有关问题
- 寻找Java高手解决思路
- 新手请问JS的一个事件对象有关问题