Skip to content

NumberFormatException when configuring spring.rabbitmq.addresses with an IPv6 address #28133

@bantu

Description

@bantu

This yaml works

spring:
  rabbitmq:
    host: "[aaaa:bbbb:cccc::d]"
    port: 5672
    username: foo
    password: "bar

but this yaml

spring:
  rabbitmq:
    addresses: "amqp://foo:bar@[aaaa:bbbb:cccc::d]:5672"

fails with

Failed to bind properties under 'spring.rabbitmq' to org.springframework.boot.autoconfigure.amqp.RabbitProperties:
    Property: spring.rabbitmq.addresses
    Value: amqp://foo:bar@[aaaa:bbbb:cccc::d]:5672
    Origin: REDACTED
    Reason: java.lang.NumberFormatException: For input string: "bbbb:cccc::d]:5672"

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions