Search code examples
spring-cloud-streamspring-cloud-dataflow

SpelParseException in Springcloud data flow


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 !


Solution

  • 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 !