提交 c61469fd 编写于 作者: 武汉红喜's avatar 武汉红喜

rocketmq-spring

上级 6fd3f4bb
......@@ -7,7 +7,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
*/
public class Consumer {
public static void main(String[] args) {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("rocketmq-consumer.xml");
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("mq-consumer.xml");
context.registerShutdownHook();
}
}
......@@ -10,7 +10,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Producer {
public static void main(String[] args) {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("rocketmq-producer.xml");
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("mq-producer.xml");
RocketMQTemplate rocketMQTemplate = (RocketMQTemplate) context.getBean("rocketMQTemplate");
for (int i = 0; i < 20; i++) {
try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册