http://static.springsource.org/spring-amqp/docs/1.0.x/reference/html/は名前空間について言及していrabbit:
ますが、スキーマの場所については言及していません。グーグル(および命名規則)は、次のようになりました。
http://www.springframework.org/schema/rabbit/spring-rabbit.xsd
しかし、このファイルは存在しません。では、xsdはどこにありますか?
http://static.springsource.org/spring-amqp/docs/1.0.x/reference/html/は名前空間について言及していrabbit:
ますが、スキーマの場所については言及していません。グーグル(および命名規則)は、次のようになりました。
http://www.springframework.org/schema/rabbit/spring-rabbit.xsd
しかし、このファイルは存在しません。では、xsdはどこにありますか?
今日のXMLスキーマは次の場所にあります。
http://www.springframework.org/schema/rabbit/spring-rabbit-1.3.xsd
http://www.springframework.org/schema/rabbit/spring-rabbit-1.4.xsd
http://www.springframework.org/schema/rabbit/spring-rabbit-1.5.xsd
必要なものを選んでください!
一時的な解決策として、このスキーマの場所を使用してオートコンプリートを有効にしています。それ以外の場合は、春のウサギの瓶にあります(ただし、IDEはそれを検出しません)。
つまり(スタッカーからのコメントから):
スキーマ宣言の上部に次のものがあります。
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:rabbit="http://www.springframework.org/schema/rabbit"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/rabbit
https://raw.github.com/SpringSource/spring-amqp/master/spring-rabbit/src/main/resources/org/springframework/amqp/rabbit/config/spring-rabbit-1.0.xsd">
私はBozhoの解決策を確認します。
したがって、基本的にスキーマ宣言の先頭には次のものがあります。
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:rabbit="http://www.springframework.org/schema/rabbit"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/rabbit
https://raw.github.com/SpringSource/spring-amqp/master/spring-rabbit/src/main/resources/org/springframework/amqp/rabbit/config/spring-rabbit-1.0.xsd">
ウサギxsdへの参照があるMETA-INF/spring.schemasを含むスプリングjarを見つけます。このMaven依存関係を追加することで、私の構成で問題が解決されました
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-amqp</artifactId>
<version>2.1.3.RELEASE</version>
</dependency>
また
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit</artifactId>
<version>1.1.1.RELEASE</version>
</dependency>
私はこの質問が古いことを知っており、私の答えはおそらく元の質問の時点では機能しなかったでしょうが、今日以降に誰かがこの質問に遭遇した場合に備えて...
春のウサギxsdは現在ここにあります:
http://www.springframework.org/schema/rabbit/spring-rabbit-1.0.xsd
また、これを使用するには、クラスパスにspring-rabbit-1.0.0.RELEASE.jarが含まれている必要があります。
AMQPjarに含める必要があります。このスレッドによると、RC1の代わりにスナップショットバージョンを使用する必要があります。そうすれば、エラーは発生しません。