Closed sryze closed 10 months ago
BTW the documentation at https://docs.spring.io/spring-cloud-function/reference/spring-cloud-function/programming-model.html#kotlin-lambda-support forgets to mention that one needs to add spring-cloud-function-kotlin
to dependencies to pull the couroutines libraries, otherwise a different error occurs: java.lang.ClassNotFoundException: kotlinx.coroutines.Dispatcher
(even if one does not define them as suspending functions, which I personally thought was a little strange)
Never mind. I forgot to pass an argument to the function, that's why it wasn't working.
But it would be great if SCF could produce a more helpful exception message.
Describe the bug
I have a function written in Kotlin similar to this:
and it always fails when I call it via its URL e.g.
localhost:8080/uppercase
But a function taking no arguments works fine, for example:
Sample
https://github.com/spring-cloud/spring-cloud-function/tree/main/spring-cloud-function-samples/function-sample-kotlin-web