春季项目中的工作流程问题

时间:2018-09-11 13:43:53

标签: spring maven spring-mvc workflow

我有一个spring项目,它是与Java 1.6一起使用的。该项目应该正常运行,但是我看到一个工作流错误,如下所示:

Multiple annotations found at this line:
    - schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd', because 1) could not find the document; 2) the document could not be read; 3) 
     the root element of the document is not <xsd:schema>.
    - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'webflow:flow-executor'.

这:

cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'webflow:flow-registry'.

cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'webflow:flow-builder-services'.

我已经回顾了先前的问题,并且他们建议删除语句的版本号,因为我所做的事情暂时起作用,因此错误不再存在。但是随后错误返回,并且我没有进行任何修改。我不知道这是月食,春季还是行家问题,但我无法纠正

我的工作流程文件如下:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:webflow="http://www.springframework.org/schema/webflow-config"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/webflow-config
        http://www.springframework.org/schema/webflow-config/spring-webflow-config.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd">


    <context:annotation-config/>

    <context:component-scan base-package="mypackage.web.workflows"/>


    <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>

    <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
        <property name="mappings">
            <value>
                /workflows/*.do=flowController
            </value>
        </property>
        <property name="alwaysUseFullPath" value="true"/>
    </bean>

    <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>

    <bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter"/>

    <bean id="flowController" class="org.springframework.webflow.mvc.servlet.FlowController">
        <property name="flowExecutor" ref="flowExecutor"/>
    </bean>

    <webflow:flow-executor id="flowExecutor" />

    <webflow:flow-registry id="flowRegistry"
        flow-builder-services="flowBuilderServices" base-path="/WEB-INF/spring-context/workflows">
        <webflow:flow-location-pattern value="/*.xml" />        
    </webflow:flow-registry>

    <bean id="expressionParser" class="org.springframework.expression.spel.standard.SpelExpressionParser">
    <constructor-arg name="configuration">
      <bean class="org.springframework.expression.spel.SpelParserConfiguration">
        <constructor-arg name="autoGrowCollections" value="true" />
        <constructor-arg name="autoGrowNullReferences" value="false" />
      </bean>
    </constructor-arg>
  </bean>

  <bean id="webflowExpressionParser" class="org.springframework.webflow.expression.spel.WebFlowSpringELExpressionParser">
    <constructor-arg name="expressionParser" ref="expressionParser" />
  </bean>


    <mvc:annotation-driven conversion-service="applicationConversionService" />
    <bean id="applicationConversionService" 
            class="mypackage.webUtils.formatters.ApplicationConversionServiceFactoryBean"/>

    <bean id="defaultConversionService" class="org.springframework.binding.convert.service.DefaultConversionService">
        <constructor-arg ref="applicationConversionService"/>
    </bean>

    <webflow:flow-builder-services id="flowBuilderServices" 
            view-factory-creator="viewFactoryCreator"
            conversion-service="defaultConversionService"/> 

    <bean id="viewFactoryCreator" class="org.springframework.webflow.mvc.builder.MvcViewFactoryCreator">
        <property name="viewResolvers">
            <list>
                <ref bean="viewResolver"/>
                <!-- ref bean="tilesViewResolver" --> 
                </list>
        </property>
    </bean>

    <bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">
            <property name="defaultErrorView" value="/public/error" />
    </bean>

    <bean id ="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"/>  

</beans>

0 个答案:

没有答案
相关问题