Skip to content

Commit 5f99e34

Browse files
committed
fix doc errors
1 parent 8371847 commit 5f99e34

File tree

1 file changed

+6
-50
lines changed

1 file changed

+6
-50
lines changed

articles/spring-apps/how-to-bind-cosmos.md

Lines changed: 6 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@ Instead of manually configuring your Spring Boot applications, you can automatic
2222

2323
## Prerequisites
2424

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.
3028

3129
## Prepare your Java project
3230

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.
3432

3533
* API type: NoSQL
3634

@@ -60,15 +58,6 @@ If you don't have a deployed Azure Spring Apps instance, follow the steps in the
6058
</dependency>
6159
```
6260

63-
* API type: Azure Table
64-
65-
```xml
66-
<dependency>
67-
<groupId>com.azure.spring</groupId>
68-
<artifactId>spring-cloud-azure-starter-storage-blob</artifactId>
69-
<version>4.7.0</version>
70-
</dependency>
71-
```
7261

7362
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`.
7463

@@ -117,39 +106,6 @@ If you don't have a deployed Azure Spring Apps instance, follow the steps in the
117106

118107
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.
119108

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:
146-
147-
```properties
148-
spring.cloud.azure.cosmos.endpoint=https://<some account>.documents.azure.com:443
149-
spring.cloud.azure.cosmos.key=abc******
150-
spring.cloud.azure.cosmos.database=testdb
151-
```
152-
153109
### [Terraform](#tab/Terraform)
154110

155111
The following Terraform script shows how to set up an Azure Spring Apps app with an Azure Cosmos DB account.
@@ -162,7 +118,7 @@ provider "azurerm" {
162118
variable "application_name" {
163119
type = string
164120
description = "The name of your application"
165-
default = "demo-abc"
121+
default = "demo-cosmosdb"
166122
}
167123
168124
resource "azurerm_resource_group" "example" {
@@ -214,7 +170,7 @@ resource "azurerm_spring_cloud_java_deployment" "example" {
214170
cpu = "2"
215171
memory = "4Gi"
216172
}
217-
instance_count = 2
173+
instance_count = 1
218174
jvm_options = "-XX:+PrintGC"
219175
runtime_version = "Java_11"
220176

0 commit comments

Comments
 (0)