Skip to content

ConfigurationPropertyName equals method fails when uppercase values start the same #15152

@gzurowski

Description

@gzurowski

After upgrading to Spring Boot 2.1 I've noticed some configuration property map structures are not properly mapped to the corresponding Java representations as given in the following example. The same code and properties are working without issues with Spring Boot 2.0 and 1.5.

application.yml:

example:
  mymap:
    MY_KEY: value1
    MY_KEY_WITH_OTHER_VALUE: value2

Java:

@Configuration
@Data
@ConfigurationProperties("example")
public class ExampleConfig {
  private Map<String, String> mymap;
}

When running the above code, mymap will contain the following data:

key: MY_KEY => value: value1
key: MY_KEY_WITH_OTHER_VALUE => value: value1

Note that the expected value for key MY_KEY_WITH_OTHER_VALUE would be value2.

Metadata

Metadata

Assignees

Labels

type: blockerAn issue that is blocking us from releasingtype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions