Spring框架搭建遇到的問題匯總


1、The resource is not on the build path of a Java project

  然后把相應的依賴加入構建路徑

2、Type mismatch: cannot convert from Class<SpringJUnit4ClassRunner> to Class<? extends Runner>

  版本過低,spring不支持junit4.5以下的。

3、No grammar constraints (DTD or XML schema) detected for the document
  警告,沒關系
4、java.lang.IllegalStateException: Failed to load ApplicationContext
          ested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'
 
           http://www.springframework.org/schema/context/spring-context-3.0.xsd
           schema寫成了 scheme
5、java.lang.ClassNotFoundException: org.aopalliance.intercept.MethodInterceptor
     因為缺少aopaliance.jar包
6、java.lang.ClassNotFoundException: org.aspectj.weaver.BCException
     aspectjweaver.jar
7、org.springframework.aop.framework.AopConfigException: Cannot proxy target class because CGLIB2 is not available. Add CGLIB to the class path or specify proxy interfaces.
          缺少jar包 cglib-2.1.3.jar 導入cglib-nodep-2.1_3.jar包,或者導入asm-2.2.3.jar和cglib-2.2.jar 
 
 
缺少的包下載: 下載
(junit-4.5.jar,cglib-nodep-2.1_3.jar,aopalliance.jar,aspectjweaver.jar)
 


免責聲明!

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



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