spring事务踩坑报错Caused by: java.lang.NoClassDefFoundError: org/springframework/context/event/EventList

spring事务踩坑报错Caused by: java.lang.NoClassDefFoundError: org/springframework/context/event/EventListenerFactory

在练习spring事务管理的时候踩坑,记录一下这个错误

报错信息如下:
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [bean.xml]; nested exception is java.lang.NoClassDefFoundError: org/springframework/context/event/EventListenerFactory

Caused by: java.lang.NoClassDefFoundError: org/springframework/context/event/EventListenerFactory

出现这个错误的原因:版本问题

spring事务踩坑报错Caused by: java.lang.NoClassDefFoundError: org/springframework/context/event/EventList_第1张图片

解决方法:
把版本提高到5.0.2

如图:
spring事务踩坑报错Caused by: java.lang.NoClassDefFoundError: org/springframework/context/event/EventList_第2张图片

你可能感兴趣的:(踩坑日志)