Skip to content

Commit

Permalink
Use namespace features for template + CF
Browse files Browse the repository at this point in the history
  • Loading branch information
dsyer committed Apr 6, 2011
1 parent 0b73851 commit 1f13fe0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
6 changes: 1 addition & 5 deletions helloworld/src/main/resources/rabbitConfiguration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>

Expand Down
7 changes: 2 additions & 5 deletions stocks/src/main/resources/servlet-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 1f13fe0

Please sign in to comment.