日期:2014-05-17 浏览次数:21000 次
<!-- 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中执行dos命令:use net 报错 system error 1312
-
一个奇怪的错误,帮忙看看
-
网络取简单数据!(附完整代码)
-
EL表达式和struts2 tag的区别,该怎么处理
-
如何将jsp里的java对象传到js里
-
c:if test 二个值打出来一样,就是不等
-
KXML2异常:PI must not start with xml 怎么解决
-
不明白?该如何解决
-
servlet上传文件乱码,该如何解决
-
tomcat没正常关闭,无法重新启动,怎样关闭端口号
-
哪位高手了解,做Mac os 应用软件(objective-c)开发前景怎么
-
怎么在jsp文件中调用.jsp文件.另外问一下。jsp文件主要实现什么功能。多谢
-
抽象和接口的面试有关问题
-
jvm是怎么找到dt.jar的,它是用哪个类加载器加载的
-
关于全局变量和局部变量的疑惑,该怎么解决
-
hql 数目字四舍五入
-
java读取excel读取不届时间类型
-
如果用空格作为分隔的话,如下写法:String.split(" "),这样分隔正确吗?该如何处理
-
jsp连接sql server 有关问题
-
mySQL序列自增长有关问题