没有网络的情况下,启动时会
Line 11 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
因为APP配置文件中引用了
<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-2.5.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context-2.5.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">怎样才能在本地加载这些?这些解释XML的必要文件可以本地加载吗?我工作环境不是个网络资源丰富的地

解决方案 »

  1.   

    applicationContext.xml是存放于web-inf目录下吗?
      

  2.   

    恩,标准的S2SH搭建,所有的文件都各司其位,只有这些XSD文件,总不能每次都连个网络吧,我这网络很不稳定
    主要就是SPRING的那个配置文件中引用了。烦的我头发都白了,求解
      

  3.   

    在xml引用中应该有本地和网络两种引用。可以把网络上的资源下载后,加上本地引用xsd
      

  4.   

    file:///path?
    我试试,估计悬
      

  5.   

    恩,是啊,这些东西都可以下载来,然后在你的xml里面配置下就行的。