Skip to content

Commit 4c8fbe3

Browse files
authored
update cache-java-get-started.md with include
1 parent c2e5a88 commit 4c8fbe3

File tree

1 file changed

+5
-42
lines changed

1 file changed

+5
-42
lines changed

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

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -208,31 +208,11 @@ Clone the repo [Java quickstart](https://github.com/Azure-Samples/azure-cache-re
208208

209209
## Build and run the app
210210

211-
1. First, if you haven't already, you must set the environment variables as noted previously.
211+
Execute the following Maven command to build and run the app:
212212

213-
## [Microsoft Entra ID Authentication (recommended)](#tab/entraid)
214-
215-
```bash
216-
export REDIS_CACHE_HOSTNAME=<your-host-name>.redis.cache.windows.net
217-
export USER_NAME=<user-name>
218-
```
219-
220-
## [Access Key Authentication](#tab/accesskey)
221-
222-
```bash
223-
export REDIS_CACHE_HOSTNAME=<your-host-name>.redis.cache.windows.net
224-
export REDIS_CACHE_KEY=<your-primary-access-key>
225-
```
226-
227-
228-
---
229-
230-
1. Execute the following Maven command to build and run the app:
231-
232-
```bash
233-
mvn compile
234-
mvn exec:java -D exec.mainClass=example.demo.App
235-
```
213+
```bash
214+
mvn compile exec:java -D exec.mainClass=example.demo.App
215+
```
236216

237217
In the following output, you can see that the `Message` key previously had a cached value. The value was updated to a new value using `jedis.set`. The app also executed the `PING` and `CLIENT LIST` commands.
238218

@@ -253,25 +233,8 @@ Cache Command : CLIENT LIST
253233
Cache Response : id=777430 addr= :58989 fd=22 name= age=1 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 obl=0 oll=0 omem=0 ow=0 owmem=0 events=r cmd=client numops=6
254234
```
255235

256-
## Clean up resources
257-
258-
If you continue to use the quickstart code, you can keep the resources created in this quickstart and reuse them.
259-
260-
Otherwise, if you're finished with the quickstart sample application, you can delete the Azure resources created in this quickstart to avoid charges.
261-
262-
> [!IMPORTANT]
263-
> Deleting a resource group is irreversible and that the resource group and all the resources in it are permanently deleted. Make sure that you do not accidentally delete the wrong resource group or resources. If you created the resources for hosting this sample inside an existing resource group that contains resources you want to keep, you can delete each resource individually instead of deleting the resource group.
264-
>
265-
266-
1. Sign in to the [Azure portal](https://portal.azure.com) and select **Resource groups**.
267-
268-
1. In the **Filter by name** textbox, type the name of your resource group. The instructions for this article used a resource group named *TestResources*. On your resource group in the result list, select **...** then **Delete resource group**.
269-
270-
:::image type="content" source="media/cache-java-get-started/azure-cache-redis-delete-resource-group.png" alt-text="Screenshot of the Azure portal that shows the Resource groups page with the Delete resource group button highlighted." lightbox="media/cache-java-get-started/azure-cache-redis-delete-resource-group.png":::
271-
272-
1. Type the name of your resource group to confirm deletion and then select **Delete**.
236+
[!INCLUDE [redis-cache-resource-group-clean-up](includes/redis-cache-resource-group-clean-up.md)]
273237

274-
After a few moments, the resource group and all of its contained resources are deleted.
275238

276239
## Next steps
277240

0 commit comments

Comments
 (0)