AnnotationConfigBeanDefinitionParser are only available on JDK 1.5 and higher

報錯:

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [beans.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

大意:SPRING的注解配置解析器只能在JDK1.5或更高版本使用,我的ECLIPSE 默认的是1.8,我使用的SPRING版本是2.5,总之就是1.8的JDK太高了,SPRING 支持不了。

解决:项目右键--》BUILD PATH--》Config Build Path--》Libraries-->Jre System Library--》Edit--》配置1.7的就OK 啦!

猜你喜欢

转载自www.cnblogs.com/1693977889zz/p/8922313.html