配置hibernate事务的时候,之前是:
<aop:config>
<aop:pointcut id="myPointcut_keys" expression="bean(taxQueryService)"/>
<aop:advisor advice-ref="txAdvice_keys" pointcut-ref="myPointcut_keys"/>
<aop:pointcut id="myPointcut_multi" expression="bean(taxQueryMultiService)"/>
<aop:advisor advice-ref="txAdvice_multi" pointcut-ref="myPointcut_multi"/>
</aop:config>
错误居然是顺序问题,<aop:pointcut>要放在<aop:pointcut>之前,改成如下形式就对了
<aop:config>
<aop:pointcut id="myPointcut_keys" expression="bean(taxQueryService)"/>
<aop:pointcut id="myPointcut_multi" expression="bean(taxQueryMultiService)"/>
<aop:advisor advice-ref="txAdvice_keys" pointcut-ref="myPointcut_keys"/>
<aop:advisor advice-ref="txAdvice_multi" pointcut-ref="myPointcut_multi"/>
</aop:config>