Use namespace features for template + CF
This commit is contained in:
@@ -4,11 +4,7 @@
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit.xsd
|
||||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
|
||||
|
||||
<bean id="connectionFactory" class="org.springframework.amqp.rabbit.connection.CachingConnectionFactory">
|
||||
<constructor-arg value="localhost"/>
|
||||
<property name="username" value="guest"/>
|
||||
<property name="password" value="guest"/>
|
||||
</bean>
|
||||
<rabbit:connection-factory id="connectionFactory"/>
|
||||
|
||||
<rabbit:admin connection-factory="connectionFactory"/>
|
||||
|
||||
|
||||
@@ -9,11 +9,8 @@
|
||||
|
||||
<bean id="stockServiceGateway" class="org.springframework.amqp.rabbit.stocks.gateway.RabbitStockServiceGateway">
|
||||
<property name="rabbitTemplate">
|
||||
<bean class="org.springframework.amqp.rabbit.core.RabbitTemplate">
|
||||
<property name="connectionFactory" ref="connectionFactory" />
|
||||
<property name="routingKey" value="app.stock.request" />
|
||||
<property name="messageConverter" ref="jsonMessageConverter" />
|
||||
</bean>
|
||||
<rabbit:template connection-factory="connectionFactory" routing-key="app.stock.request"
|
||||
message-converter="jsonMessageConverter" />
|
||||
</property>
|
||||
<property name="defaultReplyTo" value="fanout://broadcast.responses/" />
|
||||
</bean>
|
||||
|
||||
Reference in New Issue
Block a user