开发者

Spring WebFlow Configuration problem with Validator

开发者 https://www.devze.com 2023-03-25 17:50 出处:网络
I am using webflow for the first time and I am trying to set up JSR-303 Bean Validation.According to the documentation:

I am using webflow for the first time and I am trying to set up JSR-303 Bean Validation. According to the documentation:

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

I need to add a validator to my flow-builder-services.

I do this and I get the following error in my source:

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

When I 开发者_运维技巧run the app I get the following error:

    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'.

It seems the flow config is set up correctly I can navigate from my welcome page to my second page in my flow just fine.

I am using Spring-3.0.5, Spring-Webflow-2.3.0

Any help would be much appreciated.

Thanks


Found the answer to this myself.

Make sure to use

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

in the declaration statement.

The manual and the ebooks I was using showed

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

Hope that helps someone.

0

精彩评论

暂无评论...
验证码 换一张
取 消