日期:2014-05-17 浏览次数:21124 次
<!-- 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>
推荐阅读更多>
-
焦急待:怎样实现"分页又分类"的SQL语句查询? 多谢
-
中奖了, 提前散分解决方法
-
服务器连接顺利、只是服务器端不接收文件内容、一直等待Socket dataSocket = serverDataSocket.accept()
-
想致力java研发的工作oracle需要深入学习吗
-
java用dom4j.jar写下转义字符“&”
-
struts2 提交表单 第一次提交null 后退页面在提交 可以赋值,如何解决
-
小弟我要哭了啊求大神啊帮助啊jsp连接SQL server 2008的有关问题
-
97%经过SCJP5,散分!
-
对于JCreator
-
小伙伴们,大连目前JAVA工作行情如何样啊
-
稽查用户名是否可用
-
建了一个数据库连接bean-DBConn.java,小弟我要在其他bean里调用这个DBConn应该如何调用啊
-
有用J2SE开发手机网游服务器端开发弟兄吗
-
java小程序中的奇怪有关问题
-
一个关于poi操作excel文件的有关问题!
-
j2me代理连接返回码总是400的有关问题
-
怎么写一个产品优化文档
-
myeclipse10创造maven项目失败
-
见见这里为什么错了!
-
退出java程序时的线程同步有关问题