我正在使用 SpringSource Tool Suite 开发一个 spring webflow (2.0.7) 项目。我正在尝试设置基本流程。
我的 someflow.xml 看起来像这样:
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow
http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
<!- view-state declarations -->
</flow>
在 STS 工具(Eclipse 上的 Spring IDE)上,我在流 schemaLocation 附近看到一条警告消息:
Unable to locate Spring NamespaceHandler for element 'flow' of schema namespace 'http:// www.springframework.org/schema/webflow'
然后当tomcat启动时,我收到错误
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/webflow] Offending resource: ServletContext resource [/WEB-INF/flows/someflow.xml]
现在卡住了.. 有没有其他人遇到过这个问题?
最佳答案
我以前遇到过类似的问题,通常归结为内置 war 中缺少的 jar 。你能打开你正在使用的war并检查webflow jar是否在/WEB-INF/lib目录中吗?
如果您使用 Maven 进行构建,请检查您的 webflow 依赖项设置。
关于spring - 无法找到元素 'flow' 的 Spring NamespaceHandler,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4036121/