SpringBoot整合RabbitMQ
前言
版本说明
rabbitmq=3.8.4
生产者
pom
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>rabbitmq-producer</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<!--spring-boot 和 spring-cloud 版本兼容参考 https://spring.io/projects/spring-cloud -->
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies -->
<spring-boot-dependencies.version>2.2.8.RELEASE</spring-boot-dependencies.version>
<!--https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies -->
<spring-cloud-dependencies.version>Hoxton.RELEASE</spring-cloud-dependencies.version>
<!-- the project final name -->
<project.final.name>spring-boot-learn</project.final.name>
<!--https://mvnrepository.com/artifact/com.alibaba/fastjson -->
<fastjson.version>1.2.71</fastjson.version>
<!--https://mvnrepository.com/artifact/com.google.guava/guava -->
<guava.version>29.0-jre</guava.version>
<!--https://mvnrepository.com/artifact/cn.hutool/hutool-all -->
<hutool-all.version>5.3.7</hutool-all.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot-dependencies.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud-dependencies.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!--Starter for using Spring Boot's Actuator which provides production ready features to help you monitor and manage your application-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!--Starter for testing Spring Boot applications with libraries including JUnit, Hamcrest and Mockito-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!--Spring Boot Configuration Processor-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
</dependency>
<!--Spring Boot Developer Tools-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional> <!-- 表示依赖不会传递 -->
</dependency>
<!--Common tools starter-->
<!--lombok-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<d

最低0.47元/天 解锁文章
50万+

被折叠的 条评论
为什么被折叠?



