Skip to content

Mention keys with dots for yaml in "Spring Boot Configuration Binding" wiki #18690

@spencergibb

Description

@spencergibb

It is mentioned in https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-Configuration-Binding#map-based-binding for properties.

I found the answer here https://stackoverflow.com/questions/34070987/escaping-a-dot-in-a-map-key-in-yaml-in-spring-boot

See spring-attic/spring-cloud-rsocket#1 for origin. The quote/bracket notation is shown below.

spring:
  cloud:
    gateway:
      rsocket:
        client:
          forwarding:
            "[create.reservation.{version}]":
              service_name: reservation-service
              canary: false

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions