Springcloud数据流中的SpelParseException

发布于 2025-01-13 20:09:53 字数 1127 浏览 5 评论 0原文

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

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

使用的版本:

  • dataflow=2.9.2
  • skyper=2.8.2
  • http-request= 3.2.0

但是我遇到了一些麻烦url-expresion 参数格式。流部分部署,http-request 步骤中有例外。

>   Property: http.request.url-expression
>     Value: http://mydomain.fake:1234/myservice?myparams=myvalues
>     Origin: System Environment Property "SPRING_APPLICATION_JSON"
>     Reason: failed to convert java.lang.String to org.springframework.expression.Expression (caused by
> org.springframework.expression.spel.SpelParseException: EL1041E: After
> parsing a valid expression, there is still more data in the
> expression: 'colon(:)')

我确信我在流参数中使用了错误的格式,但我找不到编写它的好方法。我尝试使用简单引号双引号< /strong> 和无引号,并且例外情况始终相同。有什么帮助吗?

谢谢 !

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

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

Versions used:

  • dataflow=2.9.2
  • skipper=2.8.2
  • http-request= 3.2.0

But I have some troubles with the url-expresion param format. The stream partialy deploy, with exceptions in the http-request step.

>   Property: http.request.url-expression
>     Value: http://mydomain.fake:1234/myservice?myparams=myvalues
>     Origin: System Environment Property "SPRING_APPLICATION_JSON"
>     Reason: failed to convert java.lang.String to org.springframework.expression.Expression (caused by
> org.springframework.expression.spel.SpelParseException: EL1041E: After
> parsing a valid expression, there is still more data in the
> expression: 'colon(:)')

I'm sure that I'm using a bad format in the stream params, but I can't find the good way to write it.I tried it with simple quote, double quote and no quote, and the exception is always the same. Any help please ?

Thanks !

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

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

发布评论

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

评论(1

赤濁 2025-01-20 20:09:53

已经解决了(我想是这样)。
该表达式可能像三元运算符一样采用冒号(有些像此处

我将表达式替换

--url-expression='http://mydomain.fake:1234/myservice?myparams=myvalues'

--url-expression='http://mydomain.fake'+':1234/myservice?myparams=myvalues'

即可运行。谢谢 !

It's solved ( I think so ) .
Its possible that the expression takes the colon like a ternary operator ( some like here )

I replace the expression

--url-expression='http://mydomain.fake:1234/myservice?myparams=myvalues'

to

--url-expression='http://mydomain.fake'+':1234/myservice?myparams=myvalues'

and it works. Thanks !

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