GH-437 Refactor Azure request handler
This approach simplifies the existing request handlers while also fixing the invocation model to ensure AC is not created multiple times and ExecutionContext is properly propagated via Message headers The old request handlers are deprecated Documentation updates as well as tests Resolves #437
This commit is contained in:
@@ -25,12 +25,12 @@ import com.microsoft.azure.functions.annotation.HttpTrigger;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import org.springframework.cloud.function.adapter.azure.AzureSpringBootRequestHandler;
|
||||
import org.springframework.cloud.function.adapter.azure.FunctionInvoker;
|
||||
|
||||
/**
|
||||
* @author Soby Chacko
|
||||
*/
|
||||
public class EchoHandler extends AzureSpringBootRequestHandler<String, String> {
|
||||
public class EchoHandler extends FunctionInvoker<String, String> {
|
||||
|
||||
@FunctionName("echo")
|
||||
public String execute(@HttpTrigger(name = "req", methods = {HttpMethod.GET,
|
||||
|
||||
@@ -25,12 +25,12 @@ import com.microsoft.azure.functions.annotation.HttpTrigger;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import org.springframework.cloud.function.adapter.azure.AzureSpringBootRequestHandler;
|
||||
import org.springframework.cloud.function.adapter.azure.FunctionInvoker;
|
||||
|
||||
/**
|
||||
* @author Soby Chacko
|
||||
*/
|
||||
public class UppercaseHandler extends AzureSpringBootRequestHandler<String, String> {
|
||||
public class UppercaseHandler extends FunctionInvoker<String, String> {
|
||||
|
||||
@FunctionName("uppercase")
|
||||
public String execute(@HttpTrigger(name = "req", methods = {HttpMethod.GET,
|
||||
|
||||
Reference in New Issue
Block a user