问题
Trying to deploy into scdf k8s a function-runner into a stream
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
I've create a docker image using function-runner-kafka 1.1.0.M1
.
Always get :
***************************
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
Into stream definition, how can i set the maven
uri to the function-jar
?
I wanna run function-runner with jar code into a scdf k8s
回答1:
The function-runner
model is deprecated in favor of native Spring Cloud Function integration available in Spring Cloud Stream.
You can simply build a Spring Cloud Stream application with just function @Bean
's and have them part of the functional flow as a chain or resolved as an individual function at runtime.
See ref. guide for more details.
Once when you have an application with multiple function @Bean
's, you also have the ability to compose them with other App Starters and use it in the SCDF DSL, too.
Refer to this blog on this subject for more background.
来源:https://stackoverflow.com/questions/55455066/scdf-1-7-3-docker-k8s-function-runner-not-start