带有 http-request post 的 Spring Cloud 数据流

Springcloud data flow stream with http-request post

我正在尝试像这样部署 springcloud 数据流:

time | http-request --http-method-expression='POST' --url-expression='http://mydomain.fake/myservice?myparams=myvalues'  | log

流部署没有错误,但是当我检查 http-request 日志时,我发现异常。显然,流不工作

Property or field 'POST' cannot be found on object of type 'org.springframework.messaging.support.GenericMessage'

我检查了 github 中的 HttpRequestFunctionProperties class,但我没有得到任何关于我的错误的线索。

有什么帮助吗?

更新 1:

我明白了。它适用于 --http-method-expression=new String('POST') 但仅当流为 updated 时。我不能 直接用这个参数部署流...

谢谢!!!

错误表明 SpEL 解析器正在将 POST 解释为消息(默认评估上下文)上的字段。表达式 'POST' 未被正确解析为文字字符串。这很可能是由于一些转义问题。试试加里的建议。