Change use of RabbitTemplate to AmqpTemplate.

Javadoc cleanup
This commit is contained in:
markpollack
2010-07-14 16:05:24 -04:00
committed by Dave Syer
parent b3f7cb272c
commit 2d2e7dffca
2 changed files with 6 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
package org.springframework.amqp.helloworld;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
@@ -8,8 +9,8 @@ public class Consumer {
public static void main(String[] args) {
ApplicationContext context = new AnnotationConfigApplicationContext(RabbitConfiguration.class);
RabbitTemplate rabbitTemplate = context.getBean(RabbitTemplate.class);
System.out.println("Received: " + rabbitTemplate.receiveAndConvert());
AmqpTemplate amqpTemplate = context.getBean(AmqpTemplate.class);
System.out.println("Received: " + amqpTemplate.receiveAndConvert());
}
}

View File

@@ -1,5 +1,6 @@
package org.springframework.amqp.helloworld;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
@@ -8,8 +9,8 @@ public class Producer {
public static void main(String[] args) {
ApplicationContext context = new AnnotationConfigApplicationContext(RabbitConfiguration.class);
RabbitTemplate rabbitTemplate = context.getBean(RabbitTemplate.class);
rabbitTemplate.convertAndSend("Hello World");
AmqpTemplate amqpTemplate = context.getBean(AmqpTemplate.class);
amqpTemplate.convertAndSend("Hello World");
System.out.println("Sent: Hello World");
}