Skip to content

Commit f158e54

Browse files
authored
format md files
1 parent c24ed0f commit f158e54

File tree

2 files changed

+44
-48
lines changed

2 files changed

+44
-48
lines changed

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

Lines changed: 40 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -36,55 +36,52 @@ Clone the repo [Java quickstart](https://github.com/Azure-Samples/azure-cache-re
3636

3737
## Create a new Java app
3838

39-
Using Maven, generate a new quickstart app:
40-
41-
```xml
42-
mvn archetype:generate \
43-
-DarchetypeGroupId=org.apache.maven.archetypes \
44-
-DarchetypeArtifactId=maven-archetype-quickstart \
45-
-DarchetypeVersion=1.3 \
46-
-DinteractiveMode=false \
47-
-DgroupId=example.demo \
48-
-DartifactId=redis-jedis-test \
49-
-Dversion=1.0
50-
```
51-
52-
1. Change to the new **redis-jedis-test** project directory.
39+
1. Use maven to generate a new quickstart app:
40+
41+
```xml
42+
mvn archetype:generate \
43+
-DarchetypeGroupId=org.apache.maven.archetypes \
44+
-DarchetypeArtifactId=maven-archetype-quickstart \
45+
-DarchetypeVersion=1.3 \
46+
-DinteractiveMode=false \
47+
-DgroupId=example.demo \
48+
-DartifactId=redis-jedis-test \
49+
-Dversion=1.0
50+
```
5351

52+
1. Change to the new **redis-jedis-test** project directory.
5453
1. Open the *pom.xml* file. In the file, you see a dependency for [Jedis](https://github.com/xetorthio/jedis):
5554

56-
### [Microsoft Entra ID Authentication (recommended)](#tab/entraid)
57-
58-
```xml
59-
<dependency>
60-
<groupId>com.azure</groupId>
61-
<artifactId>azure-identity</artifactId>
62-
<version>1.11.2</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
63-
</dependency>
64-
65-
<dependency>
66-
<groupId>redis.clients</groupId>
67-
<artifactId>jedis</artifactId>
68-
<version>5.1.0</version> <!-- {x-version-update;redis.clients:jedis;external_dependency} -->
69-
</dependency>
70-
```
71-
55+
### [Microsoft Entra ID Authentication (recommended)](#tab/entraid)
7256

73-
### [Access Key Authentication](#tab/accesskey)
57+
```xml
58+
<dependency>
59+
<groupId>com.azure</groupId>
60+
<artifactId>azure-identity</artifactId>
61+
<version>1.11.2</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
62+
</dependency>
63+
64+
<dependency>
65+
<groupId>redis.clients</groupId>
66+
<artifactId>jedis</artifactId>
67+
<version>5.1.0</version> <!-- {x-version-update;redis.clients:jedis;external_dependency} -->
68+
</dependency>
69+
```
7470

75-
```xml
76-
<dependency>
77-
<groupId>redis.clients</groupId>
78-
<artifactId>jedis</artifactId>
79-
<version>5.1.0</version> <!-- {x-version-update;redis.clients:jedis;external_dependency} -->
80-
</dependency>
81-
```
82-
83-
---
8471

72+
### [Access Key Authentication](#tab/accesskey)
8573

86-
1. Close the *pom.xml* file.
74+
```xml
75+
<dependency>
76+
<groupId>redis.clients</groupId>
77+
<artifactId>jedis</artifactId>
78+
<version>5.1.0</version> <!-- {x-version-update;redis.clients:jedis;external_dependency} -->
79+
</dependency>
80+
```
81+
82+
---
8783

84+
1. Close the *pom.xml* file.
8885
1. Open *App.java* and see the code with the following code:
8986

9087
### [Microsoft Entra ID Authentication (recommended)](#tab/entraid)
@@ -202,13 +199,12 @@ mvn archetype:generate \
202199
}
203200
}
204201
```
205-
206202
---
207-
208203

209204
This code shows you how to connect to an Azure Cache for Redis instance using the cache host name and key environment variables. The code also stores and retrieves a string value in the cache. The `PING` and `CLIENT LIST` commands are also executed.
210205

211-
1. Close the *App.java*.
206+
1. Close the *App.java*.
207+
212208

213209
## Build and run the app
214210

articles/azure-cache-for-redis/includes/redis-cache-access-keys.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ ms.custom:
1010

1111
To connect your Azure Cache for Redis server, the cache client needs the host name, ports, and a key for the cache. Some clients might refer to these items by slightly different names. You can get the host name, ports, and keys from the [Azure portal](https://portal.azure.com).
1212

13-
- To get the access keys, select **Authentication** from the Resource menu. Then, select the **Access keys** tab.
14-
15-
:::image type="content" source="media/redis-cache-access-keys/redis-cache-keys.png" alt-text="Screenshot showing Azure Cache for Redis access keys.":::
16-
1713
- To get the host name and ports for your cache, select **Overview** from the Resource menu. The host name is of the form *\<DNS name>.redis.cache.windows.net*.
1814

1915
:::image type="content" source="media/redis-cache-access-keys/redis-cache-hostname-ports.png" alt-text="Screenshot showing Azure Cache for Redis properties.":::
16+
17+
- To get the access keys, select **Authentication** from the Resource menu. Then, select the **Access keys** tab.
18+
19+
:::image type="content" source="media/redis-cache-access-keys/redis-cache-keys.png" alt-text="Screenshot showing Azure Cache for Redis access keys.":::

0 commit comments

Comments
 (0)