Context namespace element 'annotation-config' ***** only available on JDK 1.5 and higher

异常:
Context namespace element ‘annotation-config’ and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser] are only available on JDK 1.5 and higher
翻译:xxx 仅在JDK 1.5及更高版本上可用

从字面意思来看,大概知道是 JDK 版本的问题。

错误原因:Spring 版本太低( 我使用Spring(2.5.3) 和 JDK 1.8 时出现上述错误),该版本的Spring 开发时还没有 JDK1.8,当然会报错了。

解决:降低 JDK 版本,或者 使用更高的 Spring 版本。

猜你喜欢

转载自blog.csdn.net/weixin_40307206/article/details/103095772