论坛首页 Java企业应用论坛

Spring 事务简化配置

浏览 65735 次
该帖已经被评为精华帖
作者 正文
   发表时间:2007-02-26  
我不懂 SPRING 感觉 配置文件真让人头疼 ,看了都疼!
0 请登录后投票
   发表时间:2007-02-26  
hermitte 写道
    <aop:config>
        
        <aop:advisor id="managerTx" advice-ref="txAdvice" pointcut="execution(* *..service.*Manager.*(..))" order="2"/>
    </aop:config>
   
    <tx:advice id="txAdvice">
        <tx:attributes>
            <tx:method name="get*" read-only="true"/>
            <tx:method name="*"/>
        </tx:attributes>
    </tx:advice>

上面是appfuse里的,我觉得比LZ的要简洁点
下面的service也好配置

<bean id="roleManager" class="org.appfuse.service.impl.RoleManagerImpl">
        <property name="roleDao" ref="roleDao"/>
    </bean>
这样就可以了



呵呵...都快一年了,版本都不一样了吧!
0 请登录后投票
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics