chengfengjie / chengfengjie.github.io

我叫MT
1 stars 0 forks source link

Rabbitmq #26

Open chengfengjie opened 6 years ago

chengfengjie commented 6 years ago

mac os 安装rabbitmq

通过homebrew安装,命令如下:

brew install rabbitmq  # 安装

brew services start rabbitmq  # 开启服务

brew services stop rabbitmq  # 关闭服务

管理页面:http://localhost:15672 默认账号密码:账号:guest 密码:guest

chengfengjie commented 6 years ago

Spring-Boot配置

添加mavn依赖

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-amqp</artifactId>
    <version>2.0.0.RELEASE</version>
</dependency>

application.properties配置

spring.rabbitmq.host=localhost
spring.rabbitmq.port=5672
spring.rabbitmq.username=guest
spring.rabbitmq.password=guest
chengfengjie commented 6 years ago

一篇文章

https://www.cnblogs.com/ityouknow/p/6120544.html