spring cvc-elt.1: Cannot find the declaration of element 'beans'解決辦法
轉載自http://blog.csdn.net/legendj/article/details/9950963
提示說:cvc-elt.1: Cannot find the declaration of element 'beans',
今天在寫spring aop示例的時候,在spring.xml檔案中新增spring aop的schema後出現紅叉,spring配置檔案如下:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
">
</beans>
提示說:cvc-elt.1: Cannot find the declaration of element 'beans',
從網上搜了一些,有的說是因為網路原因訪問不到xsd檔案,因為訪問不到網路上的xsd檔案,我們可以訪問本地的啊,在引入的spring的包中spring-beans-3.2.2.RELEASE.jar中有spring-beans-3.0.xsd檔案,其他的xsd檔案也都能在相應的包中找到,這樣就好說了,把xsd檔案的引用全部改為本地檔案:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
classpath:/org/springframework/beans/factory/xml/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
classpath:/org/springframework/context/config/spring-context-3.0.xsd
http://www.springframework.org/schema/aop
classpath:/org/springframework/aop/config/spring-aop-3.0.xsd
">
</beans>
相關文章
- IntelliJ IDEA Cannot find declaration to go toIntelliJIdeaGo
- Could not find *.apk!解決辦法APK
- 解決 Cannot find OpenSSL's
- 解決cannot find module providing package或cannot find main modulePackageAI
- ImportError: cannot import name ‘imresize‘解決辦法ImportError
- Cannot get a connection, pool exhausted解決辦法
- 解決 TypeError: Type aliases cannot be used with isinstance(). 辦法Error
- 解決Cannot find module '@angular/compiler-cli'AngularCompile
- Cannot find SS.INI file for user *** 解決方法
- virtualbox中Cannot register the hard disk錯誤解決辦法
- Android Studio 出現“Cannot resolve symbol” 解決辦法AndroidSymbol
- Workspace in use or cannot be created, choose a different one.--錯誤解決辦法
- vue3 Could not find a declaration file for moduleVue
- 部署rac 提示ORA-15018: diskgroup cannot be created解決辦法
- (一)spring beansSpringBean
- VueX Vue: Could not find a declaration file for module vuex.Vue
- element-ui 的Dialog被蒙板遮住原因及解決辦法UI
- no declaration can be found for element rabbit:connection-factory
- mongodb錯誤解決辦法-bash: ./mongod: cannot execute binary file: Exec format errorMongoDBORMError
- org.hibernate.exception.JDBCConnectionException: Cannot open connection 解決辦法ExceptionJDBC
- ORA-01102: cannot mount database in EXCLUSIVE mode 的解決辦法Database
- PHP動態編譯出現Cannot find autoconf的解決方法PHP編譯
- Cannot find folder "Maintenance Plans".AINaN
- github慢解決辦法Github
- Grub Rescue解決辦法
- /dev/null解決辦法devNull
- MSBuild Tools解決辦法UI
- java.lang.String cannot be cast to com.alibaba.fastjson.JSONObject解決辦法JavaASTJSONObject
- 檔案無法粉碎解決辦法
- /usr/bin/ld: cannot find -lopenblas
- OpenStack 的NAT解決辦法
- android ExceptionInInitializerError解決辦法AndroidExceptionError
- man出錯解決辦法
- ARP病毒解決辦法
- 公寓噪音的解決辦法
- IDEA Spring-boot-devTools 無效解決辦法二IdeaSpringbootdev
- Excel匯入資料異常Cannot get a text value from a numeric cell解決辦法Excel
- 請教Document root element "beans", must match DOCTYPE root "null"BeanNull