Giter Club home page Giter Club logo

hello-spring-function-azure's Introduction

page_type languages products description urlFragment
sample
java
azure
This is a sample application to showcase the use of Spring Cloud Function on top of Azure Functions.
hello-spring-function-azure

Example "Hello, world" Spring Boot application that runs on Azure Functions

This is a sample application to showcase the use of Spring Cloud Function on top of Azure Functions.

Features

This is just a "Hello, world", but it uses domain objects so it's easy to extend to do something more complex.

Getting Started

Prerequisites

This project uses the Maven Wrapper, so all you need is Java installed.

Installation

  • Clone the project: git clone https://github.com/Azure-Samples/hello-spring-function-azure.git
  • Configure the project to use your own resource group and your own application name (it should be unique across Azure)
    • Open the pom.xml file
    • Customize the functionResourceGroup and functionAppName properties
  • Build the project: ./mvnw clean package

Quickstart

Once the application is built, you can run it locally using the Azure Function Maven plug-in:

./mvnw azure-functions:run

And you can test it using a cURL command:

curl http://localhost:7071/api/hello -d '{"name": "Azure"}'

Deploying to Azure Functions

Deploy the application on Azure Functions with the Azure Function Maven plug-in:

./mvnw azure-functions:deploy

You can then test the running application, by running a POST request:

curl https://<YOUR_SPRING_FUNCTION_NAME>.azurewebsites.net/api/hello -d '{"name": "Azure"}'

Or a GET request:

curl https://<YOUR_SPRING_FUNCTION_NAME>.azurewebsites.net/api/hello?name=Azure

Replace the <YOUR_SPRING_FUNCTION_NAME> part by the name of your Spring Function.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.