org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [annotation.xml]; nested exception is java.lang.IllegalStateException: Context namespace element 'component-scan' and its parser class [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher

 

出现这种问题是因为JDK版本不一致导致的;下面对MyEclipse的jdk的设置进行汇总,希望可以帮到大家

1、配置myeclipse默认的jdk环境;

   1)window ---> preferences ---> java ---> Installed JRES

[org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher 问题--MyEclipse设置JDK版本

[org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher 问题--MyEclipse设置JDK版本

  2)选择要用的jdk,如果没有要用的,点击“Add”的添加

[org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher 问题--MyEclipse设置JDK版本

 

2、更改MyEclipse的编译版本。以适合自己的JDK版本

[org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher 问题--MyEclipse设置JDK版本

3、修改Tomcat对应的JDK,选择适合自己的版本

[org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher 问题--MyEclipse设置JDK版本

4、设置MyEclipse Project Facets,对应的JDK版本

[org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher 问题--MyEclipse设置JDK版本

 

相关文章:

  • 2021-07-29
  • 2021-12-21
  • 2022-01-15
  • 2021-11-11
  • 2021-08-31
  • 2021-04-11
  • 2018-12-24
  • 2022-01-31
猜你喜欢
  • 2022-12-23
  • 2021-07-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案