Questions tagged [spring-cloud-function]

Use this tag for questions related to the Spring Cloud Function project

Spring Cloud Function is a project in a Spring Cloud portfolio of projects with the following high-level goals:

  • Promote the implementation of business logic via java.util.function.(Supplier, Function, Consumer)
  • Provide necessary deployment and runtime abstractions to ensure the same code can run in multiple environments (e.g., a web endpoint, a stream processor, or a task).
  • Support a uniform programming model across serverless providers, as well as the ability to run standalone (locally or in a PaaS).
  • Enable Spring Boot features (auto-configuration, dependency injection, metrics) on serverless providers.

Resources

See Also

255 questions
1
vote
1 answer

Declaring Spring Cloud Function definition property in multiple files

There are two business sub projects using Spring Cloud Function. They will be bundled to one Spring Boot Application. Is it possible to declare spring.cloud.function.definition property multiple times in different property files like below? Project…
1
vote
0 answers

Spring Cloud Functions GCP : does not implement com.google.cloud.functions.HttpFunction

When i deploy my jar file in GCP cloud-functions, i am getting the below exception 2021-03-11T17:30:04.835Zarun-function-http Exception in thread "main" java.lang.RuntimeException: Class com.arun.serverless.CloudFunctionMain does not implement…
Arun
  • 3,440
  • 11
  • 60
  • 108
1
vote
0 answers

Spring Cloug GCP 'function' with name '' must not be null

I'm trying to develop a spring cloud application with functions and google cloud. Right now I can start the webservice using mvn function:run like the samples suggest. But I run into the following error Failed to execute…
1
vote
1 answer

Spring Cloud Function Was S3Event error converting generic message

I'm using the last version of Spring Cloud Function as below 8 2020.0.1 1.2.1
Premier
  • 4,160
  • 6
  • 44
  • 58
1
vote
0 answers

Can not run Azure function. Error - Value cannot be null. (Parameter 'provider'). - Java, Spring Cloud Function, Azure function example

I am trying to run Azure functions example, given here. There is no change made in the sample application given and ran all the instructions (installing Azure CLI, Azure core tools 3) as exactly given in the documentation. But it gives following…
1
vote
1 answer

Redirect in Spring Cloud Function after it gets triggered

after the user is hitting an URL which triggers my Spring cloud function (will be deployed later on as Amazon Lambda), and some logic is being done... I want to redirect the user to some URL. Here is what I have so far: @RestController public class…
1
vote
1 answer

spring cloud stream kafka - Functional approach: Consumer is never called when producing tombstone records

The issue is pretty much the same as https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/455 but for the Functional approach @Bean public Consumer> fooConsumer() { return message -> { …
1
vote
1 answer

Spring Cloud Function and Kafka

I'm struggling to understand how I should go about testing an application that makes use of Kafka Binder while also using Spring Cloud function. Let's use this very simple example: @SpringBootApplication public class DemoKafkaApplication { public…
1
vote
1 answer

Spring Cloud Kafka Streams Dynamic Message Conversion based on Header info

I'm trying to use Spring Cloud Kafka Streams to process messages off of a Kafka Topic that contains different types of messages. For instance, we receive a JSON message from the topic which can be either Type A or Type B message. The producer adds…
AlexCon
  • 1,127
  • 1
  • 13
  • 31
1
vote
1 answer

Spring Cloud Function with Function Routing in AWS Lambda using API Gateway

I have tried to deploy a Spring Cloud Function with multiple functions in AWS Lambda. For HTTP access I have created an HTTP API Gateway (not a REST API). I wanted to use function routing as described here:…
1
vote
1 answer

How to configure a maven project for unit testing Spring Cloud functions

What's the right way to set up the Spring Cloud project with the functions and unit testing? I want to create a standalone web application with Spring Cloud Function and have a possibility to cover it by the unit tests. I've set it up according to…
1
vote
2 answers

Is it possible to disable spring-cloud-stream's functional binding for a specific method?

I have a Spring Boot based library (using spring-data-mongo) that creates a PersistentEntities bean. PersistentEntities happens to implement the Supplier interface, so the Spring Cloud Stream functional binder is creating a binding to it. More…
Brian
  • 151
  • 3
  • 9
1
vote
0 answers

How to send custom http response code back from spring cloud functions?

I was using Spring Cloud Functions with azure...but could not figure out how using Spring cloud function I can send a custom HTTP code back in response.... as we can do in ResponseEntityAs of now I do not see a way of doing that. let's say after…
1
vote
2 answers

Securing spring cloud functions with spring security

I have a requirement to secure rest endpoints exposed by spring cloud functions hosted on azure. We want to use spring security to authenticate and authorize the call but I am unable to do it. The same code works on springboot application but does…
1
vote
1 answer

Spring functional bean registration of @Repository interface

I migrated a Spring-Cloud-Function to use Functional Bean Registration. I can register the Function that contains my application logic. However my logic should be able to autowire a dynamodbRepository which I currently defined like…
xtra
  • 1,957
  • 4
  • 22
  • 40