【发布时间】:2011-05-17 20:54:40
【问题描述】:
当我在码头运行时,我的 spring 配置有问题。我在tomcat中使用了完全相同的文件,没有任何问题。我得到的错误如下。
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 6 in XML document from ServletContext resource [/WEB-INF/web-application-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'SpringSource.org | '.
Caused by: org.xml.sax.SAXParseException: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'SpringSource.org | '.
我的架构如下所示。
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.0.5.xsd">
我不知道有什么问题。用 2 种不同的配置对其进行了测试,都给出了这个错误。
【问题讨论】:
-
检查那里列出的 XSD springframework.org/schema/security
标签: java xml xsd spring-security jetty