Skip to content

Commit 0e2508f

Browse files
authored
use include
1 parent 938b237 commit 0e2508f

File tree

3 files changed

+42
-68
lines changed

3 files changed

+42
-68
lines changed

articles/azure-cache-for-redis/cache-java-get-started.md

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -31,40 +31,7 @@ Clone the repo [Java quickstart](https://github.com/Azure-Samples/azure-cache-re
3131

3232
## Set up the working environment
3333

34-
The following steps show you how to set up the working environment for the Java app. You can choose to authenticate with Azure Cache for Redis using Microsoft Entra ID(recommended) or access keys.
35-
36-
### [Microsoft Entra ID Authentication (recommended)](#tab/entraid)
37-
38-
```bash
39-
export REDIS_CACHE_HOSTNAME=<your-host-name>.redis.cache.windows.net
40-
export USER_NAME=<user-name>
41-
```
42-
43-
Replace the placeholders with the following values:
44-
45-
- `<your-host-name>`: The DNS host name, obtained from the *Properties* section of your Azure Cache for Redis resource in the Azure portal.
46-
- `<user-name>`: Object ID of your managed identity or service principal.
47-
- You can get the user name by using the following steps:
48-
49-
1. In the Azure portal, navigate to your Azure Cache for Redis instance.
50-
1. On the navigation pane, select **Data Access Configuration**.
51-
1. On the **Redis Users** tab, find the **Username** column.
52-
53-
:::image type="content" source="media/cache-java-redisson-get-started/user-name.png" alt-text="Screenshot of the Azure portal that shows the Azure Cache for Redis Data Access Configuration page with the Redis Users tab and a Username value highlighted." lightbox="media/cache-java-redisson-get-started/user-name.png":::
54-
55-
### [Access Key Authentication](#tab/accesskey)
56-
57-
```bash
58-
export REDIS_CACHE_HOSTNAME=<your-host-name>.redis.cache.windows.net
59-
export REDIS_CACHE_KEY=<your-primary-access-key>
60-
```
61-
62-
Replace the placeholders with the following values:
63-
64-
- `<your-host-name>`: The DNS host name, obtained from the *Properties* section of your Azure Cache for Redis resource in the Azure portal.
65-
- `<your-primary-access-key>`: The primary access key, obtained from the *Access keys* section of your Azure Cache for Redis resource in the Azure portal.
66-
67-
---
34+
[!INCLUDE [redis-setup-working-environment](includes/redis-setup-working-environment.md)]
6835

6936

7037
## Create a new Java app

articles/azure-cache-for-redis/cache-java-redisson-get-started.md

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -33,40 +33,7 @@ This quickstart uses the Maven archetype feature to generate the scaffolding for
3333

3434
## Set up the working environment
3535

36-
The following steps show you how to set up the working environment for the Java app. You can choose to authenticate with Azure Cache for Redis using Microsoft Entra ID(recommended) or access keys.
37-
38-
### [Microsoft Entra ID Authentication (recommended)](#tab/entraid)
39-
40-
```bash
41-
export REDIS_CACHE_HOSTNAME=<your-host-name>.redis.cache.windows.net
42-
export USER_NAME=<user-name>
43-
```
44-
45-
Replace the placeholders with the following values:
46-
47-
- `<your-host-name>`: The DNS host name, obtained from the *Properties* section of your Azure Cache for Redis resource in the Azure portal.
48-
- `<user-name>`: Object ID of your managed identity or service principal.
49-
- You can get the user name by using the following steps:
50-
51-
1. In the Azure portal, navigate to your Azure Cache for Redis instance.
52-
1. On the navigation pane, select **Data Access Configuration**.
53-
1. On the **Redis Users** tab, find the **Username** column.
54-
55-
:::image type="content" source="media/cache-java-redisson-get-started/user-name.png" alt-text="Screenshot of the Azure portal that shows the Azure Cache for Redis Data Access Configuration page with the Redis Users tab and a Username value highlighted." lightbox="media/cache-java-redisson-get-started/user-name.png":::
56-
57-
### [Access Key Authentication](#tab/accesskey)
58-
59-
```bash
60-
export REDIS_CACHE_HOSTNAME=<your-host-name>.redis.cache.windows.net
61-
export REDIS_CACHE_KEY=<your-primary-access-key>
62-
```
63-
64-
Replace the placeholders with the following values:
65-
66-
- `<your-host-name>`: The DNS host name, obtained from the *Properties* section of your Azure Cache for Redis resource in the Azure portal.
67-
- `<your-primary-access-key>`: The primary access key, obtained from the *Access keys* section of your Azure Cache for Redis resource in the Azure portal.
68-
69-
---
36+
[!INCLUDE [redis-setup-working-environment](includes/redis-setup-working-environment.md)]
7037

7138

7239
## Create a new Java app
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
ms.topic: include
3+
ms.date: 12/19/2024
4+
---
5+
6+
7+
The following steps show you how to set up the working environment for the Java app. You can choose to authenticate with Azure Cache for Redis using Microsoft Entra ID(recommended) or access keys.
8+
9+
### [Microsoft Entra ID Authentication (recommended)](#tab/entraid)
10+
11+
```bash
12+
export REDIS_CACHE_HOSTNAME=<your-host-name>.redis.cache.windows.net
13+
export USER_NAME=<user-name>
14+
```
15+
16+
Replace the placeholders with the following values:
17+
18+
- `<your-host-name>`: The DNS host name, obtained from the *Properties* section of your Azure Cache for Redis resource in the Azure portal.
19+
- `<user-name>`: Object ID of your managed identity or service principal.
20+
- You can get the user name by using the following steps:
21+
22+
1. In the Azure portal, navigate to your Azure Cache for Redis instance.
23+
1. On the navigation pane, select **Data Access Configuration**.
24+
1. On the **Redis Users** tab, find the **Username** column.
25+
26+
:::image type="content" source="media/cache-java-redisson-get-started/user-name.png" alt-text="Screenshot of the Azure portal that shows the Azure Cache for Redis Data Access Configuration page with the Redis Users tab and a Username value highlighted." lightbox="media/cache-java-redisson-get-started/user-name.png":::
27+
28+
### [Access Key Authentication](#tab/accesskey)
29+
30+
```bash
31+
export REDIS_CACHE_HOSTNAME=<your-host-name>.redis.cache.windows.net
32+
export REDIS_CACHE_KEY=<your-primary-access-key>
33+
```
34+
35+
Replace the placeholders with the following values:
36+
37+
- `<your-host-name>`: The DNS host name, obtained from the *Properties* section of your Azure Cache for Redis resource in the Azure portal.
38+
- `<your-primary-access-key>`: The primary access key, obtained from the *Access keys* section of your Azure Cache for Redis resource in the Azure portal.
39+
40+
---

0 commit comments

Comments
 (0)