Skip to content

Commit a82e24a

Browse files
committed
edits
1 parent 138c4a2 commit a82e24a

File tree

3 files changed

+106
-105
lines changed

3 files changed

+106
-105
lines changed

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

Lines changed: 67 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -32,53 +32,54 @@ If you don't have a deployed Azure Spring Apps instance, follow the steps in the
3232

3333
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.
3434

35-
* API type: NoSQL
36-
37-
```xml
38-
<dependency>
39-
<groupId>com.azure.spring</groupId>
40-
<artifactId>spring-cloud-azure-starter-data-cosmos</artifactId>
41-
<version>4.3.0</version>
42-
</dependency>
43-
```
44-
45-
* API type: MongoDB
46-
47-
```xml
48-
<dependency>
49-
<groupId>org.springframework.boot</groupId>
50-
<artifactId>spring-boot-starter-data-mongodb</artifactId>
51-
</dependency>
52-
```
53-
54-
* API type: Cassandra
55-
56-
```xml
57-
<dependency>
58-
<groupId>org.springframework.boot</groupId>
59-
<artifactId>spring-boot-starter-data-cassandra</artifactId>
60-
</dependency>
61-
```
62-
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.3.0</version>
70-
</dependency>
71-
```
35+
* API type: NoSQL
36+
37+
```xml
38+
<dependency>
39+
<groupId>com.azure.spring</groupId>
40+
<artifactId>spring-cloud-azure-starter-data-cosmos</artifactId>
41+
<version>4.3.0</version>
42+
</dependency>
43+
```
44+
45+
* API type: MongoDB
46+
47+
```xml
48+
<dependency>
49+
<groupId>org.springframework.boot</groupId>
50+
<artifactId>spring-boot-starter-data-mongodb</artifactId>
51+
</dependency>
52+
```
53+
54+
* API type: Cassandra
55+
56+
```xml
57+
<dependency>
58+
<groupId>org.springframework.boot</groupId>
59+
<artifactId>spring-boot-starter-data-cassandra</artifactId>
60+
</dependency>
61+
```
62+
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.3.0</version>
70+
</dependency>
71+
```
7272

7373
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`.
7474

7575
## Bind your app to the Azure Cosmos DB
7676

77-
#### [Service Connector](#tab/Service-Connector)
77+
### [Service Connector](#tab/Service-Connector)
7878

7979
1. Use the Azure CLI to configure your Spring app to connect to a Cosmos SQL Database with a system-assigned managed identity by using the `az spring connection create` command, as shown in the following example.
80-
> [!NOTE]
81-
> Updating Azure Cosmos DB database settings can take a few minutes to complete.
80+
81+
> [!NOTE]
82+
> Updating Azure Cosmos DB database settings can take a few minutes to complete.
8283

8384
```azurecli
8485
az spring connection create cosmos-sql \
@@ -92,34 +93,34 @@ If you don't have a deployed Azure Spring Apps instance, follow the steps in the
9293
--system-assigned-identity
9394
```
9495

95-
> [!NOTE]
96-
> If you're using [Service Connector](../service-connector/overview.md) for the first time, start by running the command `az provider register -n Microsoft.ServiceLinker` to register the Service Connector resource provider.
96+
> [!NOTE]
97+
> If you're using [Service Connector](../service-connector/overview.md) for the first time, start by running the command `az provider register --namespace Microsoft.ServiceLinker` to register the Service Connector resource provider.
98+
>
99+
> If you're using Cosmos Cassandra, use a `--key_space` instead of `--database`.
97100
98-
> [!NOTE]
99-
> If you're using Cosmos Cassandra, use a `--key_space` instead of `--database`.
101+
> [!TIP]
102+
> Run the command `az spring connection list-support-types --output table` to get a list of supported target services and authentication methods for Azure Spring Apps. If the `az spring` command isn't recognized by the system, check that you have installed the required extension by running `az extension add --name spring`.
100103
101-
> [!TIP]
102-
> Run the command `az spring connection list-support-types --output table` to get a list of supported target services and authentication methods for Azure Spring Apps. If the `az spring` command isn't recognized by the system, check that you have installed the required extension by running `az extension add --name spring`.
104+
1. Alternately, you can use the Azure portal to configure this connection by completing the following steps. The Azure portal provides the same capabilities as the Azure CLI and provides an interactive experience.
103105

104-
1. Or you can use the Azure portal to configure this connection. The Azure portal provides the same capabilities as the Azure CLI and provides an interactive experience.
106+
1. Select your Azure Spring Apps instance in the Azure portal and select **Apps** from the navigation menu. Choose the app you want to connect and select **Service Connector** on the navigation menu.
105107

106-
* Select your Azure Spring Apps instance in the Azure portal and select **Apps** from the left menu. Choose the app you want to connect and select **Service Connector** on the left.
108+
1. Select **Create**.
107109

108-
* Select the **Create** button.
110+
1. On the **Basics** tab, for service type, select Cosmos DB, then choose a subscription. For API type, select Core (SQL), choose a Cosmos DB account, and a database. For client type, select Java, then select **Next: Authentication**. If you haven't created your database yet, see [Quickstart: Create an Azure Cosmos DB account, database, container, and items from the Azure portal](../cosmos-db/nosql/quickstart-portal.md).
109111

110-
* In the **Basics** tab, for Service type, select Cosmos DB. Choose a subscription, for API type, select Core (SQL), choose a Cosmos DB account, a database and for Client type, select Java. Select **Next: Authentication**. Refer to the quickstart on [creating a cosmos database](../cosmos-db/create-cosmosdb-resources-portal.md) for help if your database isn't created yet.
111-
* In the **Authentication** tab, choose Connection string. Service Connector automatically retrieves the access key from your Cosmos DB account. Select **Next: Networking**.
112+
1. On the **Authentication** tab, choose **Connection string**. Service Connector automatically retrieves the access key from your Cosmos DB account. Select **Next: Networking**.
112113

113-
* In the **Networking** tab, select "Configure firewall rules to enable access to target service". Select **Next: Review + Create**.
114+
1. On the **Networking** tab, select **Configure firewall rules to enable access to target service**, then select **Next: Review + Create**.
114115

115-
* In the **Review + Create** tab, wait for the validation to pass and then select **Create**. The creation can take a few minutes to complete.
116+
1. On the **Review + Create** tab, wait for the validation to pass and then select **Create**. The creation can take a few minutes to complete.
116117

117-
* 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.
118+
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.
118119

119-
#### [Service Binding](#tab/Service-Binding)
120+
### [Service Binding](#tab/Service-Binding)
120121

121-
> [!NOTE]
122-
> 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. See Service Connector tab for instructions.
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.
123124
124125
Azure Cosmos DB has five different API types that support binding. The following procedure shows how to use them:
125126

@@ -130,25 +131,26 @@ Azure Cosmos DB has five different API types that support binding. The following
130131
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.
131132

132133
1. Select **Service binding**, and select **Create service binding**. To fill out the form, select:
134+
133135
* The **Binding type** value **Azure Cosmos DB**.
134136
* The API type.
135137
* Your database name.
136138
* The Azure Cosmos DB account.
137139

138-
> [!NOTE]
139-
> If you are using Cassandra, use a key space for the database name.
140+
> [!NOTE]
141+
> If you are using Cassandra, use a key space for the database name.
140142
141143
1. Restart the application by selecting **Restart** on the application page.
142144

143145
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:
144146

145-
```properties
146-
spring.cloud.azure.cosmos.endpoint=https://<some account>.documents.azure.com:443
147-
spring.cloud.azure.cosmos.key=abc******
148-
spring.cloud.azure.cosmos.database=testdb
149-
```
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+
```
150152

151-
#### [Terraform](#tab/Terraform)
153+
### [Terraform](#tab/Terraform)
152154

153155
The following Terraform script shows how to set up an Azure Spring Apps app with an Azure Cosmos DB account.
154156

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ With Azure Spring Apps, you can bind select Azure services to your applications
4747

4848
## Bind your app to the Azure Database for MySQL instance
4949

50-
#### [Service Connector](#tab/Service-Connector)
50+
### [Service Connector](#tab/Service-Connector)
5151

52-
Configure your Spring app to connect to an Azure Database for MySQL Flexible Server with a system-assigned managed identity, using the `az spring connection create` command, as shown in the following example.
52+
To configure your Spring app to connect to an Azure Database for MySQL Flexible Server with a system-assigned managed identity, use the `az spring connection create` command, as shown in the following example.
5353

5454
```azurecli
5555
az spring connection create mysql-flexible \
@@ -63,10 +63,10 @@ az spring connection create mysql-flexible \
6363
--system-assigned-identity
6464
```
6565

66-
#### [Service Binding](#tab/Service-Binding)
66+
### [Service Binding](#tab/Service-Binding)
6767

68-
> [!NOTE]
69-
> 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. See Service Connector tab for instructions.
68+
> [!NOTE]
69+
> 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.
7070
7171
1. Note the admin username and password of your Azure Database for MySQL account.
7272

@@ -89,7 +89,7 @@ az spring connection create mysql-flexible \
8989
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
9090
```
9191

92-
#### [Terraform](#tab/Terraform)
92+
### [Terraform](#tab/Terraform)
9393

9494
The following Terraform script shows how to set up an Azure Spring Apps app with Azure Database for MySQL.
9595

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

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,22 @@ If you don't have a deployed Azure Spring Apps instance, follow the steps in the
3030

3131
## Prepare your Java project
3232

33-
1. Add the following dependency to your project's pom.xml file:
33+
1. Add the following dependency to your project's *pom.xml* file:
3434

35-
```xml
36-
<dependency>
37-
<groupId>org.springframework.boot</groupId>
38-
<artifactId>spring-boot-starter-data-redis-reactive</artifactId>
39-
</dependency>
40-
```
35+
```xml
36+
<dependency>
37+
<groupId>org.springframework.boot</groupId>
38+
<artifactId>spring-boot-starter-data-redis-reactive</artifactId>
39+
</dependency>
40+
```
4141

42-
1. Remove any `spring.redis.*` properties from the `application.properties` file
42+
1. Remove any `spring.redis.*` properties from the *application.properties* file
4343

4444
1. Update the current deployment using `az spring app update` or create a new deployment using `az spring app deployment create`.
4545

4646
## Bind your app to the Azure Cache for Redis
4747

48-
#### [Service Connector](#tab/Service-Connector)
48+
### [Service Connector](#tab/Service-Connector)
4949

5050
1. Use the Azure CLI to configure your Spring app to connect to a Redis database with an access key using the `az spring connection create` command, as shown in the following example.
5151

@@ -61,35 +61,34 @@ If you don't have a deployed Azure Spring Apps instance, follow the steps in the
6161
--secret
6262
```
6363

64-
> [!NOTE]
65-
> If you're using [Service Connector](../service-connector/overview.md) for the first time, start by running the command `az provider register -n Microsoft.ServiceLinker` to register the Service Connector resource provider.
66-
67-
> [!NOTE]
68-
> If you're using Redis Enterprise, use the `az spring connection create redis-enterprise` command instead.
64+
> [!NOTE]
65+
> If you're using [Service Connector](../service-connector/overview.md) for the first time, start by running the command `az provider register --namespace Microsoft.ServiceLinker` to register the Service Connector resource provider.
66+
>
67+
> If you're using Redis Enterprise, use the `az spring connection create redis-enterprise` command instead.
6968
70-
> [!TIP]
71-
> Run the command `az spring connection list-support-types --output table` to get a list of supported target services and authentication methods for Azure Spring Apps. If the `az spring` command isn't recognized by the system, check that you have installed the required extension by running `az extension add --name spring`.
69+
> [!TIP]
70+
> Run the command `az spring connection list-support-types --output table` to get a list of supported target services and authentication methods for Azure Spring Apps. If the `az spring` command isn't recognized by the system, check that you have installed the required extension by running `az extension add --name spring`.
7271
73-
1. Or you can use the Azure portal to configure this connection. The Azure portal provides the same capabilities as the Azure CLI and provides an interactive experience.
72+
1. Alternately, you can use the Azure portal to configure this connection by completing the following steps. The Azure portal provides the same capabilities as the Azure CLI and provides an interactive experience.
7473

75-
* Select your Azure Spring Apps instance in the Azure portal and select **Apps** from the left menu. Choose the app you want to connect and select **Service Connector** on the left.
74+
1. Select your Azure Spring Apps instance in the Azure portal and then select **Apps** from the navigation menu. Choose the app you want to connect and then select **Service Connector** on the navigation menu.
7675

77-
* Select the **Create** button.
76+
1. Select **Create**.
7877

79-
* In the **Basics** tab, for Service type, select Cache for Redis. Choose a subscription and a Redis cache server. Fill in the Redis database name ("0" in this example) and under Client type, select Java. Select **Next: Authentication**.
78+
1. On the **Basics** tab, for service type, select Cache for Redis. Choose a subscription and a Redis cache server. Fill in the Redis database name ("0" in this example) and under client type, select Java. Select **Next: Authentication**.
8079

81-
* In the **Authentication** tab, choose Connection string. Service Connector will automatically retrieve the access key from your Redis database account. Networking
80+
1. On the **Authentication** tab, choose **Connection string**. Service Connector will automatically retrieve the access key from your Redis database account. Select **Next: Networking**.
8281

83-
* In the **Networking** tab, select "Configure firewall rules to enable access to target service". **Click Review + Create.**
82+
1. On the **Networking** tab, select **Configure firewall rules to enable access to target service**, then select **Review + Create**.
8483

85-
* In the **Review + Create** tab, wait for the validation to pass and then select **Create**. The creation can take a few minutes to complete.
84+
1. On the **Review + Create** tab, wait for the validation to pass and then select **Create**. The creation can take a few minutes to complete.
8685

87-
* Once the connection between your Spring app your Redis database has been generated, you can see it in the Service Connector page and select the unfold button to view the configured connection variables.
86+
1. Once the connection between your Spring app your Redis database has been generated, you can see it in the Service Connector page and select the unfold button to view the configured connection variables.
8887

89-
#### [Service Binding](#tab/Service-Binding)
88+
### [Service Binding](#tab/Service-Binding)
9089

91-
> [!NOTE]
92-
> 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. See Service Connector tab for instructions.
90+
> [!NOTE]
91+
> 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.
9392
9493
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 Cache for Redis. This application is the same one you updated or deployed in the previous step.
9594

@@ -99,14 +98,14 @@ If you don't have a deployed Azure Spring Apps instance, follow the steps in the
9998

10099
1. To ensure the service binding is correct, select the binding name and verify its details. The `property` field should look like this:
101100

102-
```properties
103-
spring.redis.host=some-redis.redis.cache.windows.net
104-
spring.redis.port=6380
105-
spring.redis.password=abc******
106-
spring.redis.ssl=true
107-
```
101+
```properties
102+
spring.redis.host=some-redis.redis.cache.windows.net
103+
spring.redis.port=6380
104+
spring.redis.password=abc******
105+
spring.redis.ssl=true
106+
```
108107

109-
#### [Terraform](#tab/Terraform)
108+
### [Terraform](#tab/Terraform)
110109

111110
The following Terraform script shows how to set up an Azure Spring Apps app with Azure Cache for Redis.
112111

0 commit comments

Comments
 (0)