当前位置: 首页 > 工具软件 > Framework > 使用案例 >

org.springframework.context.ApplicationContextException: Failed to start bean ‘org.springframework.a

季嘉良
2023-12-01

报错

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

好了,密码修改过来,成功运行,也警示大家要细心哦!!!

 类似资料:

相关阅读

相关文章

相关问答