【问题标题】:Spring WebFlow Configuration problem with ValidatorValidator 的 Spring WebFlow 配置问题
【发布时间】:2011-08-04 15:06:50
【问题描述】:

我是第一次使用 webflow,我正在尝试设置 JSR-303 Bean Validation。根据文档:

http://static.springsource.org/spring-webflow/docs/2.3.x/reference/htmlsingle/spring-webflow-reference.html#view-validate

我需要在我的 flow-builder-services 中添加一个验证器。

我这样做了,但我的源代码中出现以下错误:

cvc-complex-type.3.2.2: Attribute 'validator' is not allowed to appear in element 'webflow:flow-builder-services'.

当我运行应用程序时,我收到以下错误:

    org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [webflowContext.xml]
Offending resource: class path resource [spring-servlet.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 18 in XML document from class path resource [webflowContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: Attribute 'validator' is not allowed to appear in element 'webflow:flow-builder-services'.

似乎流程配置设置正确,我可以从欢迎页面导航到流程中的第二页。

我正在使用 Spring-3.0.5、Spring-Webflow-2.3.0

任何帮助将不胜感激。

谢谢

【问题讨论】:

    标签: java spring configuration spring-mvc spring-webflow


    【解决方案1】:

    自己找到了答案。

    请务必使用

    http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.3.xsd

    在声明语句中。

    显示了我使用的手册和电子书

    http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd

    希望对某人有所帮助。

    【讨论】:

      猜你喜欢
      • 2011-08-06
      • 2012-12-30
      • 2011-09-28
      • 2018-09-24
      • 1970-01-01
      • 1970-01-01
      • 2013-11-21
      • 1970-01-01
      • 2018-10-10
      相关资源
      最近更新 更多