spring配置事务里面这句话是什么意思?

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/05 17:08:18
spring配置事务里面这句话是什么意思?

spring配置事务里面这句话是什么意思?
spring配置事务里面这句话是什么意思?

spring配置事务里面这句话是什么意思?

所有方式只读...


    <!-- 事务属性配置 -->  

    <tx:advice id="txAdvice" transaction-manager="H4TxManager">  

        <tx:attributes>  

            <!-- 方法对应的传播属性 -->  

            <tx:method name="save*" propagation="REQUIRED" />  

            <tx:method name="add*" propagation="REQUIRED" />  

            <tx:method name="create*" propagation="REQUIRED" />  

            <tx:method name="insert*" propagation="REQUIRED" />  

            <tx:method name="update*" propagation="REQUIRED" />  

            <tx:method name="merge*" propagation="REQUIRED" />  

            <tx:method name="del*" propagation="REQUIRED" />  

            <tx:method name="remove*" propagation="REQUIRED" />  

            <tx:method name="put*" propagation="REQUIRED" />  

            <tx:method name="use*" propagation="REQUIRED"/>  


.以上权限高(新增,修改,删除什么的)


            <tx:method name="get*" propagation="REQUIRED" read-only="true" />  

            <tx:method name="count*" propagation="REQUIRED" read-only="true" />  

            <tx:method name="find*" propagation="REQUIRED" read-only="true" />  

            <tx:method name="list*" propagation="REQUIRED" read-only="true" />  

            <tx:method name="*" read-only="true" />  


.以上的只读权限(统计,显示.)


        </tx:attributes>  

    </tx:advice>  

    <!-- 事务控制位置,一般在业务层service -->  

    <aop:config>  

        <aop:pointcut id="txPointcut" expression="execution(* com.genius.service..*.*(..))" />  

        <aop:advisor advice-ref="txAdvice" pointcut-ref="txPointcut"/>  

    </aop:config>


我公司的实例配置