Let's add the spring-amqp jars to our project. spring-amqp has a starter dependency which configures some common things for us, such as ConnectionFactory and RabbitTemplate, so we will use that. To add this dependency, we will configure our pom.xml follows:
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-amqp</artifactId></dependency>
The next step is to configure the connections; we will use the application.yaml file because we are using the starter. In the next section, we will do the configuration.