AnnotationConfigBeanDefinitionParser are only available on JDK 1.5 and higher

Error:

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

To the effect: SPRING's annotation configuration parser can only be used in JDK1.5 or higher. My ECLIPSE defaults to 1.8, and the SPRING version I use is 2.5. In short, the 1.8 JDK is too high, and SPRING cannot support it.

Solution: Right-click on the project--"BUILD PATH--"Config Build Path--"Libraries-->Jre System Library--"Edit--"The configuration of 1.7 is OK!

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324738261&siteId=291194637