Using Spring 2.5.6, I saw the exception: org.xml.sax.SAXParseException: White spaces are required between publicId and systemId when my <beans> tag was defined as:
简单说。就是前一个是publicID,后一个是SystemId,是一一对应的
http://www.springframework.org/schema/beans publicID http://www.springframework.org/schema/beans/spring-beans-2.5.xsd SystemId
Code:
<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:webflow="http://www.springframework.org/schema/webflow-config"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/webflow-config
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd">
Code:
<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:webflow="http://www.springframework.org/schema/webflow-config"
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/webflow-config
http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd">
其他的我懒得管了。只是记录一下
本文详细解析了使用Spring 2.5.6时遇到的XML配置错误,特别是关于publicID和systemId之间的空格需求,并提供了正确的配置示例进行修正。
173万+

被折叠的 条评论
为什么被折叠?



