在 rabit:template 我遇到设置 rabbit:reply-listener 错误消息的问题:
cvc-complex-type.2.1:元素'兔子:模板'一定没有品格 或元素信息项[children],因为类型的内容 类型为空。
我试图设置此conext来处理 RabbitTemplate 的 convertSendAndReceive 方法
<?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">
<rabbit:connection-factory id="rabbitConnFactory"
username="${rabbitmq.user}" password="${rabbitmq.password}" host="${rabbitmq.host}" port="${rabbitmq.port}" />
<rabbit:admin connection-factory="rabbitConnFactory" />
<rabbit:queue name="rabbitQueue" />
<rabbit:topic-exchange name="rabbitExchange">
<rabbit:bindings>
<rabbit:binding queue="rabbitQueue" pattern="camel" />
</rabbit:bindings>
</rabbit:topic-exchange>
<rabbit:template id="rabbitTemplate"
connection-factory="rabbitConnFactory" exchange="rabbitExchange" routing-key="camel" >
<rabbit:reply-listener />
</rabbit:template>
<rabbit:listener-container
connection-factory="rabbitConnFactory" concurrency="10">
<rabbit:listener ref="rabbitMessageListener" method="createDongleIncident"
queue-names="rabbitQueue" />
</rabbit:listener-container>
<bean id="rabbitMessageListener" class="com.bosch.mome.dongle.listener.DongleQueueListener" />