org.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.amqp.rabbit.config.internalRabbitListenerEndpointRegistry'; nested exception is org.springframework.amqp.AmqpIllegalStateException: Fatal exception on listener startup
使用RabbitMq测试交换机、队列时候报的错
一开始我以为是队列的监听器配置信息和监听器代码写错了,反复查看并没有错误。
然后继续往下看报错,有这俩报错,瞬间顿悟。
Caused by: org.springframework.amqp.AmqpIllegalStateException: Fatal exception on listener startup
Caused by: org.springframework.amqp.AmqpAuthenticationException: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED
ACCESS_REFUSED
这么大个字,看了好几遍居然没想到这方面的错误,大概是配置密码的时候copy错了
spring:
rabbitmq:
host: 192.168.149.128
port: 5672
virtual-host: /hotel
username: hotel
password: hotel
hotel
毅然决然的写成了guest
好了,密码修改过来,成功运行,也警示大家要细心哦!!!