gpt4 book ai didi

java - Jetty 的 XML 模式错误

转载 作者:行者123 更新时间:2023-11-29 06:17:58 24 4
gpt4 key购买 nike

我在 jetty 中运行 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 种不同的配置对其进行测试,但均出现此错误。

最佳答案

以下网址好像无效,重定向到springsource.org

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

你能试试那个吗?

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

关于java - Jetty 的 XML 模式错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4313975/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com