1、进入RabbitMQ安装目录/usr/local/Cellar
cd /usr/local/Cellar/rabbitmq/3.5.6/sbin
2、执行如下命令
sudo ./rabbitmq-server restart 或 sudo ./rabbitmq-server
3、新建终端进入RabbitMQ安装目录/usr/local/Cellar,启动插件(只需首次启动)
cd /usr/local/Cellar/rabbitmq/3.5.6/sbin
sudo ./rabbitmq-plugins enable rabbitmq_management
4、登陆管理界面http://localhost:15672/
账号:guest
密码:guest
5、新建项目中所用到的队列
6、项目中配置文件application.properties的配置
spring.rabbitmq.host=127.0.0.1
spring.rabbitmq.port=5672
spring.rabbitmq.username=guest
spring.rabbitmq.password=guest
网友评论