SpringCloud Stream 4.x 差异还是有点大
版本说明
一、SpringCloud Stream 2.x
Bili搜一下周阳那个Cloud视频
二、SpringCloud Stream 3.x
看这个兄弟的Blog:
https://blog.csdn.net/QAQpig/article/details/129120856
三、如果是SrpingCloud Stream 4.x,往下看
一、POM
<!-- Rabbit MQ -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
</dependency>
<!-- web、actuator -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
起作用的,实际上就这几个,对于Rabbit,老版本需要引入depend相关,新版本就一个binder搞定,因为binder已经对于stream与rabbit依赖关系做了很好的POM封装,源码如下:
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-cloud-stream-binder-rabbit-parent</artifactId>
<version>4.0.2</version> <!-- Do not remove. Ignore yellow warning -->
<packaging>pom</</