阅读(4878) (0)

Micronaut Azure Function

2023-02-23 13:44:35 更新

对 Azure Function 的支持在 Micronaut Azure 子项目中实现。

使用 Azure Function 的简单函数

您可以使用直接实现 Azure Function Java SDK 的 Micronaut 实现 Azure Functions。

使用 CLI

创建 Azure 函数:

$ mn create-function-app my-app --features azure-function

或者使用 Micronaut Launch

$ curl https://launch.micronaut.io/create/function/example\?features\=azure-function -o example.zip
$ unzip example.zip -d example

带有 Azure 函数的 HTTP 函数

您可以使用 Micronaut 对 Azure HTTP 功能的支持来部署使用 @Controller 等的常规 Micronaut 应用程序。

使用 CLI

创建 Azure HTTP 函数:

$ mn create-app my-app --features azure-function

或者使用 Micronaut Launch

$ curl https://launch.micronaut.io/example.zip\?features\=azure-function -o example.zip
$ unzip example.zip -d example