我想实施事务mgmt声明性方法,但是我无法启用获取没有尝试自动代理基础结构

时间:2019-05-03 11:51:37

标签: java spring spring-mvc

2019-05-03 16:15:04.967 DEBUG AnnotationAwareAspectJAutoProxyCreator:359 - Did not attempt to auto-proxy infrastructure class [org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor]
2019-05-03 16:15:07.180 DEBUG AnnotationAwareAspectJAutoProxyCreator:359 - Did not attempt to auto-proxy infrastructure class [org.springframework.transaction.interceptor.TransactionInterceptor]
2019-05-03 16:15:07.206 DEBUG NameMatchTransactionAttributeSource:96 - Adding transactional method [*] with attribute [PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly,-Exception]

我的配置是:

<aop:aspectj-autoproxy proxy-target-class="true"/>
<!-- DataSource TransactionManager cfg -->
<bean id="transactionManager"
    class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <property name="dataSource" ref="ds" />
</bean>
<!-- Cfg Tx service -->
<tx:advice id="txAdvice">
    <tx:attributes>
        <tx:method name="*" propagation="REQUIRED"
            rollback-for="Exception" read-only="true" />
    </tx:attributes>
</tx:advice>
<aop:config>
    <aop:pointcut
        expression="within(com.traccar.service.TraccarService)" id="ptc" />
    <aop:advisor advice-ref="txAdvice" pointcut-ref="ptc" />
</aop:config>

0 个答案:

没有答案