欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

SpringBoot链接RabbitMQ错误 Failed to instantiate [com.rabbitmq.client.Connection]

程序员文章站 2024-03-15 23:34:42
...

错误

Failed to instantiate [com.rabbitmq.client.Connection]: Factory method ‘mqConnectionSeckill’ threw exception; nested exception is java.io.IOException

原因

  • 当前用户没有访问权限
    SpringBoot链接RabbitMQ错误 Failed to instantiate [com.rabbitmq.client.Connection]
    设置权限
    SpringBoot链接RabbitMQ错误 Failed to instantiate [com.rabbitmq.client.Connection]
  • rabbitmq配置错误
    没有配置rabbitmq.virtual-host = / 写成了rabbitmq.virtual-host=
#Rabbitmq配置
rabbitmq.address-list=localhost:5672
rabbitmq.username=guest
rabbitmq.password=guest
rabbitmq.publisher-confirms=true
rabbitmq.virtual-host=/
rabbitmq.queue=seckill
相关标签: RabbitMQ rabbitmq