You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/spring-apps/how-to-bind-cosmos.md
+6-50Lines changed: 6 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,15 +22,13 @@ Instead of manually configuring your Spring Boot applications, you can automatic
22
22
23
23
## Prerequisites
24
24
25
-
* A deployed Azure Spring Apps instance.
26
-
* An Azure Cosmos DB account and a database.
27
-
* The Azure Spring Apps extension for the Azure CLI.
28
-
29
-
If you don't have a deployed Azure Spring Apps instance, follow the steps in the [Quickstart: Deploy your first application to Azure Spring Apps](./quickstart.md).
25
+
* An application deployed to Azure Spring Apps. For more information, see [Quickstart: Deploy your first application to Azure Spring Apps](./quickstart.md).
26
+
* An Azure Cosmos DB database instance.
27
+
*[Azure CLI](/cli/azure/install-azure-cli) version 2.45.0 or higher.
30
28
31
29
## Prepare your Java project
32
30
33
-
1. Add one of the following dependencies to your application's pom.xml pom.xml file. Choose the dependency that is appropriate for your API type.
31
+
1. Add one of the following dependencies to your application's pom.xml file. Choose the dependency that is appropriate for your API type.
34
32
35
33
* API type: NoSQL
36
34
@@ -60,15 +58,6 @@ If you don't have a deployed Azure Spring Apps instance, follow the steps in the
1. Update the current app by running `az spring app deploy`, or create a new deployment for this change by running `az spring app deployment create`.
74
63
@@ -117,39 +106,6 @@ If you don't have a deployed Azure Spring Apps instance, follow the steps in the
117
106
118
107
1. Once the connection between your Spring apps and your Cosmos DB database has been generated, you can see it in the Service Connector page and select the unfold button to view the configured connection variables.
119
108
120
-
### [Service Binding](#tab/Service-Binding)
121
-
122
-
> [!NOTE]
123
-
> We recommend using Service Connector instead of Service Binding to connect your app to your database. Service Binding is going to be deprecated in favor of Service Connector. For instructions, see the Service Connector tab.
124
-
125
-
Azure Cosmos DB has five different API types that support binding. The following procedure shows how to use them:
126
-
127
-
1. Create an Azure Cosmos DB database. Refer to the quickstart on [creating a database](../cosmos-db/create-cosmosdb-resources-portal.md) for help.
128
-
129
-
1. Record the name of your database. For this procedure, the database name is **testdb**.
130
-
131
-
1. Go to your Azure Spring Apps service page in the Azure portal. Go to **Application Dashboard** and select the application to bind to Azure Cosmos DB. This application is the same one you updated or deployed in the previous step.
132
-
133
-
1. Select **Service binding**, and select **Create service binding**. To fill out the form, select:
134
-
135
-
* The **Binding type** value **Azure Cosmos DB**.
136
-
* The API type.
137
-
* Your database name.
138
-
* The Azure Cosmos DB account.
139
-
140
-
> [!NOTE]
141
-
> If you are using Cassandra, use a key space for the database name.
142
-
143
-
1. Restart the application by selecting **Restart** on the application page.
144
-
145
-
1. To ensure the service is bound correctly, select the binding name and verify its details. The `property` field should be similar to this example:
0 commit comments