日期:2014-05-17 浏览次数:21315 次
<!-- 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控制SQL数据库备份和恢复 完整代码 高手们帮下忙 高分
-
(关于cast)知道小弟我的方法有有关问题,只求更好的建议(新手)
-
java同步块解决思路
-
hibernate.cache.use_second_level_cache跟hibernate.cache.use_query_cache
-
求问一个瓜分方法. - 把特定字符之间的字符剥离出来
-
一条插入语句的异常,大家帮给看看哪错了
-
想要访问一个地址,其后把下载的东西放到一个文件夹里,求思路,有需要用的类最好
-
求大神写个oracle函数解决方法
-
大一初学者,真心,关于多线程休眠的有关问题
-
为何在linux的tomcat的conf目录配置应用程序无效
-
tomcat5.0的连接池配置有关问题
-
点击上载不弹出上载框显示乱码
-
怎么通过复选框获取整行数据,详细内容见代码
-
圣人指点?
-
在下新手,问个关于返回值的有关问题
-
web service No services have been found.解决方法
-
关于线程 调度的一个有关问题
-
将byte[]写入类对象中,不能完全写入,该如何解决
-
Jsp页面中标签的DTD在工程的什么地方 能找到?该如何解决