尝试将一个函数运行器部署到scdf k8s中
http --server.port=9001 | f-run: function-runner --function.className=com.example.functions.CharCounter --class-name=com.example.functions.CharCounter --location="maven://io.spring.sample:function-sample:jar:1.0.2" | log
我使用function-runner-kafka 1.1.0.M1
创建了一个docker图像。
永远得到:
***************************
APPLICATION FAILED TO START
***************************
Description:
Binding to target org.springframework.cloud.stream.app.function.app.FunctionProperties@264f218 failed:
Property: function.className
Value: null
Reason: may not be empty
Action:
Update your application's configuration
进入流定义,我怎样才能将maven
uri设置为function-jar
?
我想用jar代码运行函数运行器到scdf k8s
不推荐使用function-runner
模型,而是赞成Spring Cloud Stream中提供的原生Spring Cloud Function集成。
您只需使用@Bean
函数构建Spring Cloud Stream应用程序,并将它们作为链的一部分功能流或在运行时作为单个函数解析。
有关详细信息,请参阅ref. guide。
一旦你有一个具有多个功能@Bean
的应用程序,你也可以将它们与其他App Starters组合在一起,并在SCDF DSL中使用它。
有关更多背景信息,请参阅此blog on this subject。