[org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher 問題--MyEclipse設置JDK版本


 

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

  2)選擇要用的jdk,如果沒有要用的,點擊“Add”的添加

 

2、更改MyEclipse的編譯版本。以適合自己的JDK版本

3、修改Tomcat對應的JDK,選擇適合自己的版本

4、設置MyEclipse Project Facets,對應的JDK版本

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM