阶段5 3.微服务项目【学成在线】_day05 消息中间件RabbitMQ_14.RabbitMQ研究-与springboot整合-搭建环境

我们选择基于Spring-Rabbit去操作RabbitMQ
https://github.com/spring-projects/spring-amqp
使用spring-boot-starter-amqp会自动添加spring-rabbit依赖,如下:

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring‐boot‐starter‐amqp</artifactId>
</dependency>
<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring‐boot‐starter‐test</artifactId>
</dependency>
<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring‐boot‐starter‐logging</artifactId>
</dependency>


加入引用的包
刷新一下包


消费者也加入包的引用

增加配置文件




把springboot的日志文件拷贝过来。从cms的工程复制过来的



定义包

创建配置文件类

 

创建springboot的启动类




再把生产者的整个的包复制到消费者里面






 

posted @ 2019-10-04 18:22  高山-景行  阅读(179)  评论(0编辑  收藏  举报