Springcloud数据流与http-request post

发布于 2025-01-14 02:47:36 字数 837 浏览 5 评论 0原文

我正在尝试部署一个 springcloud 数据流,如下所示:

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

流部署没有错误,但是当我检查 http-request 日志时,我可以看到异常。显然,流不起作用

在以下对象上找不到属性或字段“POST” 输入“org.springframework.messaging.support.GenericMessage”

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

有什么帮助吗?

更新1:

我明白了。它适用于 --http-method-expression=new String('POST') 但仅当流 更新 时。我无法使用此参数直接部署流...

谢谢!!!

I'm trying to deploy a springcloud data flow stream like this:

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

The stream deploy without errors, but when I check the http-request log I can see a exception. Obviously, the stream not works

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

I checked the HttpRequestFunctionProperties class from github, but I didn't get any clue about my fault.

Any help please?

Update 1:

I get it. It works with --http-method-expression=new String('POST') BUT only when the stream is updated . I cant deploy the stream directly with this param ...

Thanks !!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寄人书 2025-01-21 02:47:36

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

The error indicates that the SpEL parser is interpreting POST as a field on the Message (the default evaluation context). The expression 'POST' is not being parsed correctly as a literal string. This is most likely due to some escaping problem. Try what Gary suggests.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文