日期:2014-05-17 浏览次数:21260 次
<!-- 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中 符号 | 是什么意思?麻烦解释一下.该如何解决
-
如何单独取出kindeditor里面的图片和附件地址
-
http上传大文件(2G之上)
-
各位,小弟问一个corba的有关问题
-
设计模式的误区,Java软件工程师对设计模式的诋毁及滥用
-
BigInteger有关问题
-
求真:现时主流技术都是用AJAX。JSP早就不用了
-
spring3+struts2+security3的开源架构,等散分解决方法
-
关于站内搜索的一个有关问题
-
eclipse 的使用有关问题(新手有关问题)
-
大家知道有没有这样的框架?该怎么解决
-
dom4j 解析 xml的有关问题
-
問個JNDI的問題解决方案
-
在ajax请求struts中的action里面,怎么把数据填充到actionform里面呢
-
怎么跳到上一页
-
怎样在javabean里调用oracle的数据,用列表的形式回返小弟我们需要的值,并且要分页,排序而jsp只是起简单的显示作用
-
请教:现在有没有可以编辑struts2的集成开发环境啊
-
怎么能让程序正常运行并且显示面板,请在基础上添加程序
-
Myeclipse中的全部javaweb工程都无法部署tomcat,求解