【发布时间】:2014-03-05 00:27:39
【问题描述】:
sn-p 来自我的 xml 文件:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/context/spring-context-3.1.xsd">
<!-- http://www.springframework.org/schema/aop -->
<!-- http://www.springframework.org/schema/aop/spring-aop.xsd"> -->
<context:component-scan base-package="myPackage" />
执行后我看到以下消息:
警告 [WrapperSimpleAppMain] [XmlBeanDefinitionReader] 忽略 XML 验证警告 org.xml.sax.SAXParseException;行号:14; 列号:80; SchemaLocation:schemaLocation 值 = 'http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/context/ spring-context-3.1.xsd' 必须有偶数个 URI。 在 com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
如何正确解决这个问题?
【问题讨论】:
标签: java xml spring spring-mvc xsd