从Spring Web流程中的GE​​T中读取查询字符串

sig*_*igi 4 spring spring-mvc java-ee spring-webflow spring-webflow-2

HY.

我使用执行密钥继续弹簧网络流程.(订单paypal付款),并需要从get读取查询字符串.&TokenID和&PayerID

以下是Paypal在确认付款后重定向用户的方式:

/sampleflow?execution=e1s1&_eventId=approved&token=EC5D7416956W8431713&PayerID=TN2RE8ZTH67JN
Run Code Online (Sandbox Code Playgroud)

如果eventID被批准,我的流程将重定向到付款已确认状态.这部分正在运作.我只需要以某种方式获取查询字符串参数.

有什么办法吗?

dva*_*use 9

我假设您正在尝试访问流定义xml文件中的请求参数.您可以使用EL变量requestParameters访问参数.

<evaluate expression="someService.doSomething(requestParameters.TokenID, requestParameters.PayerID)" />
Run Code Online (Sandbox Code Playgroud)

http://docs.spring.io/spring-webflow/docs/2.3.x/reference/html/el.html#el-variable-requestParameters