我目前在使用Spring Web Flows 2.0.7时遇到问题,当提交变量时,Webflow崩溃了。相应的Web流程如下所示:
<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">
<!-- some model, i use below -->
<var name="register"
class="org.zcore.conference.Registration" />
<!-- my input id -->
<input type="long" name="conId" value="flowScope.conId"/>
<!-- my first view state -->
<view-state id="register" model="register">
<!-- imagine much more stuff here -->
</flow>
当使用附加的conId(http:// localhost:8080 / app / myflow?conId = 123)输入流时,会弹出以下错误:
2012-08-07 17:33:34,583 WARN 25205715@qtp-28882952-5 com.coremedia.cae.webflow.AbstractFlowViewController - Error handling flow request: 'Could not serialize flow execution; make sure all objects stored in flow or flash scope are serializable': /app/flow
org.springframework.webflow.execution.repository.snapshot.SnapshotCreationException: Could not serialize flow execution; make sure all objects stored in flow or flash scope are serializable
我很惊讶,提供的值似乎不是可序列化的,因为它是一个简单的int值。看起来我在这里缺少一些基本的东西。
答案 0 :(得分:1)
确保org.zcore.conference.Registration可序列化 如果是,则可能是视图状态中的另一个对象