Skip to content

Commit 2473817

Browse files
authored
Merge pull request #115821 from Flanker32/hanxiao/updateJava
Update java function code reference
2 parents e40162e + 8e5c2fb commit 2473817

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.openpublishing.publish.config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@
163163
"url": "https://github.com/Azure/azure-functions-templates",
164164
"branch": "dev"
165165
},
166+
{
167+
"path_to_root": "azure-functions-samples-java",
168+
"url": "https://github.com/Azure-Samples/azure-functions-samples-java",
169+
"branch": "master"
170+
},
166171
{
167172
"path_to_root": "functions-quickstart-java",
168173
"url": "https://github.com/Azure-Samples/functions-quickstarts-java",

articles/azure-functions/functions-create-first-azure-function-azure-cli.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Provide the following values when prompted:
100100
| **groupId** | `com.fabrikam` | A value that uniquely identifies your project across all projects, following the [package naming rules](https://docs.oracle.com/javase/specs/jls/se6/html/packages.html#7.7) for Java. |
101101
| **artifactId** | `fabrikam-functions` | A value that is the name of the jar, without a version number. |
102102
| **version** | `1.0-SNAPSHOT` | Choose the default value. |
103-
| **package** | `com.fabrikam.functions` | A value that is the Java package for the generated function code. Use the default. |
103+
| **package** | `com.fabrikam` | A value that is the Java package for the generated function code. Use the default. |
104104

105105
Type `Y` or press Enter to confirm.
106106

@@ -140,15 +140,15 @@ The return object is an [ActionResult](/dotnet/api/microsoft.aspnetcore.mvc.acti
140140
#### Function.java
141141
*Function.java* contains a `run` method that receives request data in the `request` variable is an [HttpRequestMessage](/java/api/com.microsoft.azure.functions.httprequestmessage) that's decorated with the [HttpTrigger](/java/api/com.microsoft.azure.functions.annotation.httptrigger) annotation, which defines the trigger behavior.
142142

143-
:::code language="java" source="~/functions-quickstart-java/functions-add-output-binding-storage-queue/src/main/java/com/function/Function.java":::
143+
:::code language="java" source="~/azure-functions-samples-java/src/main/java/com/functions/Function.java":::
144144

145145
The response message is generated by the [HttpResponseMessage.Builder](/java/api/com.microsoft.azure.functions.httpresponsemessage.builder) API.
146146

147147
#### pom.xml
148148

149149
Settings for the Azure resources created to host your app are defined in the **configuration** element of the plugin with a **groupId** of `com.microsoft.azure` in the generated pom.xml file. For example, the configuration element below instructs a Maven-based deployment to create a function app in the `java-functions-group` resource group in the `westus` region. The function app itself runs on Windows hosted in the `java-functions-app-service-plan` plan, which by default is a serverless Consumption plan.
150150

151-
:::code language="java" source="~/functions-quickstart-java/functions-add-output-binding-storage-queue/pom.xml" range="116-155":::
151+
:::code language="java" source="~/azure-functions-samples-java/pom.xml" range="62-102":::
152152

153153
You can change these settings to control how resources are created in Azure, such as by changing `runtime.os` from `windows` to `linux` before initial deployment. For a complete list of settings supported by the Maven plug-in, see the [configuration details](https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Functions:-Configuration-Details).
154154

0 commit comments

Comments
 (0)