spring2.5.6的‘annotation-config’ and its parser class are only available on JDK 1.5 and higher错误解决

在使用Spring 2.5.6版本并尝试在JRE 8环境下运行时,遇到了'annotation-config'解析错误。错误表明该功能仅支持JDK 1.5及以上版本。通过在项目中创建org.springframework.core包,并仿照源码创建JdkVersion.java,然后替换spring-core-2.5.6.jar中的对应类文件,可以解决此问题。完成这些步骤后,重新部署项目即可消除错误。
摘要由CSDN通过智能技术生成


最近在学习马士兵的spring教程,视频教程中的项目中用的是spring低版本(2.5.6),今天用jre 8测试了一下,发现错误: 

Unexpected exception parsing XML document from class path resource [applicationContext-dao.xml]; nested exception is java.lang.IllegalStateException: Context namespace element ‘annotation-config’ and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser] are only available on JDK 1.5 and higher

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值