读书人

Spring JDBC Transaction Spring 3.0.

发布时间: 2012-07-01 13:15:00 作者: rapoo

Spring JDBC Transaction Spring 3.0.6 事务配置

<context:annotation-config></context:annotation-config>
<context:component-scan base-package="com.frank.test.dao.*"></context:component-scan>
<context:component-scan base-package="com..frank.test.service.*"></context:component-scan>

<bean id="propertyConfigurer"
/>
</constructor-arg>
</bean>

<bean id="dataSource" ref="dataSource"/>
</bean>

<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="get*" read-only="true"/>
<tx:method name="find*" read-only="true"/>
<tx:method name="*"/>
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="allServiceOperation" expression="execution(* com.frank.test.service.I*.*(..))"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="allServiceOperation"/>
</aop:config>

注意:

匹配格式: com.frank.test.service.I*(接口名).*(..)

?

读书人网 >其他数据库

热点推荐