Attempt to write JSON by hand
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"IsEncrypted": false,
|
||||
"Values": {
|
||||
"AzureWebJobsStorage": "",
|
||||
"AzureWebJobsDashboard": ""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"scriptFile" : "../function-sample-azure-1.0.0.BUILD-SNAPSHOT-azure.jar",
|
||||
"entryPoint" : "example.FooHandler.handleRequest",
|
||||
"bindings" : [ {
|
||||
"type" : "httpTrigger",
|
||||
"name" : "foo",
|
||||
"direction" : "in",
|
||||
"authLevel" : "anonymous",
|
||||
"methods" : [ "get", "post" ]
|
||||
}, {
|
||||
"type" : "http",
|
||||
"name" : "$return",
|
||||
"direction" : "out"
|
||||
} ],
|
||||
"disabled" : false
|
||||
}
|
||||
@@ -17,18 +17,22 @@
|
||||
package example;
|
||||
|
||||
import com.microsoft.azure.serverless.functions.ExecutionContext;
|
||||
import com.microsoft.azure.serverless.functions.annotation.HttpOutput;
|
||||
import com.microsoft.azure.serverless.functions.annotation.HttpTrigger;
|
||||
|
||||
import org.springframework.cloud.function.adapter.azure.AzureSpringBootRequestHandler;
|
||||
|
||||
/**
|
||||
* @author Soby Chacko
|
||||
*/
|
||||
public class FooHandler extends AzureSpringBootRequestHandler {
|
||||
public class FooHandler extends AzureSpringBootRequestHandler<Foo, Bar> {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Bar handleRequest(Foo foo, ExecutionContext context) {
|
||||
@Override
|
||||
public @HttpOutput(name = "bar") Bar handleRequest(
|
||||
@HttpTrigger(name = "foo", methods = { "get", "post" }) Foo foo,
|
||||
ExecutionContext context) {
|
||||
context.getLogger().info("Invoking entry point method");
|
||||
return (Bar)super.handleRequest(foo,context);
|
||||
return (Bar) super.handleRequest(foo, context);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user