Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring 我为什么要添加状态?_Spring_Maven_Spring Webflow - Fatal编程技术网

Spring 我为什么要添加状态?

Spring 我为什么要添加状态?,spring,maven,spring-webflow,Spring,Maven,Spring Webflow,嗨,我得到这个错误,我不知道为什么 缺少开始状态。向流中至少添加一个状态 文件:main-flow.xml <?xml version="1.0" encoding="UTF-8"?> <flow xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.spr

嗨,我得到这个错误,我不知道为什么

缺少开始状态。向流中至少添加一个状态

文件:main-flow.xml
<?xml version="1.0" encoding="UTF-8"?>
<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.3.xsd">

<view-state id="start" view="start.xhtml">

</view-state>

文件pom.xml

org.springframework.webflow
SpringWebFlow
2.3.1.1发布

您必须将start state参数添加到流标记中

<?xml version="1.0" encoding="UTF-8"?>
<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.3.xsd"
start-state="start">

结束状态不是使其工作的必要条件,但当然建议使用结束状态来清理该实例的资源

<end-state id="end"/>


添加一个“结束状态”并从“开始”视图状态转换到该状态,然后查看错误消息是否消失。awayok认为,我通过使用“”而不是“”来解决它
<end-state id="end"/>