/*
* Project: SpringCloudDemo-BUS-RabbitMQ
*
* File Created at 2017年2月13日
*
* Copyright 2016 CMCC Corporation Limited.
* All rights reserved.
*
* This software is the confidential and proprietary information of
* ZYHY Company. ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license.
*/
package com.curiousby.cn;
import java.util.Date;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.context.annotation.Bean;
import org.springframework.messaging.handler.annotation.Payload;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Component;
/**
* @Type RabbitMQProcess.java
* @Desc
* @author hadoop
* @date 2017年2月13日 下午3:55:46
* @version
*/
@Component
@RabbitListener(queues = "mqqueue")
@EnableScheduling
public class Reciever {
@Bean
public Sender mySender() {
return new Sender();
}
@Bean
public Queue fooQueue() {
return new Queue("mqqueue");
}
@RabbitHandler
public void process(@Payload String foo) {
System.out.println(new Date() + "==== :" + foo);
}
}
/**
* Revision history
* -------------------------------------------------------------------------
*
* Date Author Note
* -------------------------------------------------------------------------
* 2017年2月13日 hadoop creat
*/
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
SpringCloudDemo-BUS-RabbitMQ.zip (28个子文件)
SpringCloudDemo-BUS-RabbitMQ
.project 1KB
src
test
resources
java
main
webapp
WEB-INF
web.xml 222B
index.jsp 57B
META-INF
MANIFEST.MF 39B
resources
application.properties 670B
java
com
curiousby
cn
Reciever.java 2KB
Sender.java 1KB
SpringBootSampleApplication.java 1KB
target
m2e-wtp
web-resources
META-INF
MANIFEST.MF 296B
maven
com.curiousby.cn
SpringCloudDemo-Feign
pom.properties 275B
pom.xml 4KB
SpringCloudDemo-BUS-RabbitMQ
pom.properties 282B
pom.xml 3KB
classes
application.properties 670B
com
curiousby
cn
SpringBootSampleApplication.class 788B
Sender.class 792B
Reciever.class 2KB
test-classes
.settings
org.eclipse.wst.jsdt.ui.superType.container 49B
org.eclipse.wst.common.project.facet.core.xml 219B
org.eclipse.m2e.core.prefs 90B
org.eclipse.jdt.core.prefs 430B
org.eclipse.wst.validation.prefs 50B
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.core.resources.prefs 191B
org.eclipse.wst.common.component 721B
.jsdtscope 639B
pom.xml 3KB
.classpath 19KB
共 28 条
- 1
资源评论
- 小营1232018-11-30感谢楼主分享。
- Hermit_20092018-07-30节省一部分工作,有帮助,谢谢
- 程序员一灯2018-06-18没问题可以用。上面那个人人品真差。到处给别人差评。
- qq_283959592017-05-11大哥,你这个资源没有呀curiousby2017-08-14有啊,这么多人下载了,都没事
curiousby
- 粉丝: 23
- 资源: 151
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功