---
schema_version: "1"
id: 332e7db96d01a6e729e7bc60e2a7faa3358ead02b9eba4fb948b4976c361a66a
title: Redis の XML と Maven のサポート - Mule 4
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/redis-connector/5.1/redis-connector-xml-maven.md
canonical_url: https://docs.mulesoft.com/jp/redis-connector/5.1/redis-connector-xml-maven
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 5aaa7f1da5cc0d6f944feadb234fb9b323678bd965bf23dbb54b5b0f0b2b7ab1
description: MuleSoft Documentation Site
release: "5.1"
latest: false
---
# Redis の XML と Maven のサポート - Mule 4

Anypoint Studio の XML エディターまたはテキストエディターから XML で Mule アプリケーションを手動でコーディングする場合、参照ステートメントを XML Mule フローおよび Apache Maven `pom.xml`​ ファイルに追加することで、アプリケーションで Redis Connector にアクセスできます。

<table>
<tbody><tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
<div class="paragraph">
<p>Studio を使用して、このトピックで説明されている手動プロセスを回避できます。Redis Connector を Anypoint Studio にインストールすると、Studio は自動的に XML コードに Redis Connector の名前空間およびスキーマの場所を入力し、<code>pom.xml</code>​ ファイルに連動関係を追加します。</p>
</div>
</td>
</tr>
</tbody></table>

## [](#コネクタの名前空間の追加)コネクタの名前空間の追加

次のコードを設定 XML のヘッダーの `<mule>`​ タグ内に貼り付けます。

```xml
<mule xmlns:redis="http://www.mulesoft.org/schema/mule/redis
...
http://www.mulesoft.org/schema/mule/redis
http://www.mulesoft.org/schema/mule/redis/current/mule-redis.xsd">
```

次の例は、mule XML ブロック内に名前空間ステートメントが配置される方法を示しています。

```xml
<mule xmlns:redis="http://www.mulesoft.org/schema/mule/redis"
	xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking"
	xmlns:http="http://www.mulesoft.org/schema/mule/http"
	xmlns="http://www.mulesoft.org/schema/mule/core"
	xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:spring="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
	http://www.springframework.org/schema/beans/spring-beans-current.xsd
	http://www.mulesoft.org/schema/mule/core
	http://www.mulesoft.org/schema/mule/core/current/mule.xsd
	http://www.mulesoft.org/schema/mule/http
	http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
	http://www.mulesoft.org/schema/mule/ee/tracking
	http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
	http://www.mulesoft.org/schema/mule/redis
	http://www.mulesoft.org/schema/mule/redis/current/mule-redis.xsd">
```

## [](#pom-ファイルの連動関係の追加)POM ファイルの連動関係の追加

`pom.xml`​ Maven ファイルは Anypoint Studio によって生成され、Mule アプリケーションの連動関係が含まれます。Mule アプリケーションを手動でコーディングする場合、この XML スニペットを `pom.xml`​ ファイルに含め、コネクタへのアクセスを有効にします。Mule Runtime Engine は、`RELEASE`​ 連動関係キーワードを現在のバージョンに変換します。

```xml
<dependency>
  <groupId>com.mulesoft.connectors</groupId>
  <artifactId>mule-redis-connector</artifactId>
  <version>RELEASE</version>
  <classifier>mule-plugin</classifier>
</dependency>
```

最新の `pom.xml`​ ファイル情報を取得するには、​[Anypoint Exchange](https://www.mulesoft.com/exchange/)​ のコネクタにアクセスして、**\[Dependency Snippets (連動関係スニペット)\]**​ をクリックします。

## [](#次のステップ)次のステップ

名前空間および `pom.xml`​ ファイルを完了したら、Redis の[例](https://docs.mulesoft.com/jp/redis-connector/5.1/redis-connector-examples)​を試すことができます。

## [](#関連情報)関連情報

[MuleSoft ヘルプセンター](https://help.mulesoft.com)