解决spring中使用声明事务java.lang.NoClassDefFoundError: org/aspectj/util/PartialOrder$PartialComparable.

spring中使用声明事务配置如下:

<!-- ================================事务相关控制======================== -->
<bean name="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"></property>
</bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="delete*" propagation="REQUIRED" read-only="false"
rollback-for="java.lang.Exception" no-rollback-for="java.lang.RuntimeException" />
<tx:method name="insert*" propagation="REQUIRED" read-only="false"
rollback-for="java.lang.RuntimeException" />
<tx:method name="update*" propagation="REQUIRED" read-only="false"
rollback-for="java.lang.Exception" />
<tx:method name="find*" propagation="SUPPORTS" />
<tx:method name="get*" propagation="SUPPORTS" />
<tx:method name="select*" propagation="SUPPORTS" />
</tx:attributes>
</tx:advice>
<aop:config>
<aop:pointcut id="pc"
expression="execution(public * com.framework..*.*(..))" />
<aop:advisor pointcut-ref="pc" advice-ref="txAdvice" />
</aop:config>
启动程序时控制台报错:java.lang.NoClassDefFoundError: org/aspectj/util/PartialOrder$PartialComparable.
报错原因:缺少jar包,aspectjweaver-1.5.2.jar
————————————————
版权声明:本文为CSDN博主「元子敲代码」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/xiafuyuan/article/details/8782705

posted @ 2021-04-16 08:43  疯子110  阅读(299)  评论(0编辑  收藏  举报