没有互联网连接时,Spring schemaLocation失败

我正在使用Spring,并且application-context.xml具有以下定义:


<?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:util="http://www.springframework.org/schema/util"

   xmlns:context="http://www.springframework.org/schema/context"

   xmlns:aop="http://www.springframework.org/schema/aop"

   xmlns:tx="http://www.springframework.org/schema/tx"

   xmlns:p="http://www.springframework.org/schema/p"

   xmlns:security="http://www.springframework.org/schema/security"

   xsi:schemaLocation="

   http://www.springframework.org/schema/beans 

   http://www.springframework.org/schema/beans/spring-beans-2.0.xsd

   http://www.springframework.org/schema/util 

   http://www.springframework.org/schema/util/spring-util-2.0.xsd

   http://www.springframework.org/schema/context

   http://www.springframework.org/schema/context/spring-context-2.1.xsd

   http://www.springframework.org/schema/tx

   http://www.springframework.org/schema/tx/spring-tx.xsd

   http://www.springframework.org/schema/aop

   http://www.springframework.org/schema/aop/spring-aop-2.0.xsd

   http://www.springframework.org/schema/security

   http://www.springframework.org/schema/security/spring-security-2.0.xsd"

   >

.....


当我的互联网连接断开时,我无法通过tomcat或码头运行我的应用程序。

它给:


[main] WARN  org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Ignored XML validation warning

org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document '/spring-beans-2.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)

有什么建议如何解决吗?



皈依舞
浏览 846回答 3
3回答
打开App,查看更多内容
随时随地看视频慕课网APP