階段5 3.微服務項目【學成在線】_day05 消息中間件RabbitMQ_14.RabbitMQ研究-與springboot整合-搭建環境

咱們選擇基於Spring-Rabbit去操做RabbitMQ
https://github.com/spring-projects/spring-amqp
使用spring-boot-starter-amqp會自動添加spring-rabbit依賴,以下:git

<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>


加入引用的包
刷新一下包


消費者也加入包的引用
github

增長配置文件




把springboot的日誌文件拷貝過來。從cms的工程複製過來的



定義包

建立配置文件類

 spring

建立springboot的啓動類




再把生產者的整個的包複製到消費者裏面






 springboot

相關文章
相關標籤/搜索