Skip to content

Latest commit

 

History

History

function-sample-azure-http-trigger-gradle

Spring Cloud Function on Azure - Gradle Example

Show how to build SCF/Azure application with the Azure Function Gradle Plugin.

Important
For a general information about building and deploying Azure Functions with Spring Cloud Function, consult the Azure Adapter documentation.

Usage

Package Staging folder

Use the script below to package your staging folder:

./gradlew azureFunctionsPackage

Run Azure Functions locally

Use the script below to run the function locally.

./gradlew azureFunctionsRun

Once up and running test with:

curl -X POST http://localhost:7071/api/bean -d 'low case test'

should trigger an output like: LOW CASE TEST%

Tip
To debug your functions, please add localDebug = "transport=dt_socket,server=y,suspend=n,address=5005" to the azurefunctions section of your build.gradle.
Important
After completing the sample run ./gradlew clean to clean the hanging azure-functions-java-worker.jar processes.

Deploy Azure Functions to Azure Cloud

./gradlew azureFunctionsDeploy