Skip to content

Commit adaa5d4

Browse files
committed
Update java function code reference
1 parent f921d73 commit adaa5d4

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
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: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,14 @@ Provide the following values when prompted:
9797

9898
| Prompt | Value | Description |
9999
| ------ | ----- | ----------- |
100-
| **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. |
101-
| **artifactId** | `fabrikam-functions` | A value that is the name of the jar, without a version number. |
100+
| **groupId** | `com.functions` | 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. |
101+
| **artifactId** | `azure-functions-sample` | 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.functions` | 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

107-
Maven creates the project files in a new folder with a name of _artifactId_, which in this example is `fabrikam-functions`.
107+
Maven creates the project files in a new folder with a name of _artifactId_, which in this example is `azure-functions-sample`.
108108
::: zone-end
109109
Navigate into the project folder:
110110

@@ -115,7 +115,7 @@ cd LocalFunctionProj
115115
::: zone-end
116116
::: zone pivot="programming-language-java"
117117
```
118-
cd fabrikam-functions
118+
cd azure-functions-sample
119119
```
120120
::: zone-end
121121
This folder contains various files for the project, including configurations files named [local.settings.json](functions-run-local.md#local-settings-file) and [host.json](functions-host-json.md). Because *local.settings.json* can contain secrets downloaded from Azure, the file is excluded from source control by default in the *.gitignore* file.
@@ -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)