Skip to content
This repository was archived by the owner on Jan 19, 2022. It is now read-only.

Configuration properties compatible with Spring Boot Relaxed BindingΒ #406

@lukasznyrc

Description

@lukasznyrc

Spring Boot uses some relaxed rules for binding Environment properties to @ConfigurationProperties beans, so there does not need to be an exact match between the Environment property name and the bean property name.
Common examples where this is useful include dash-separated environment properties (for example, context-path binds to contextPath).

This is not a valid case when it comes to Spring Cloud AWS configuration, for example it's not possible to use kebab case, which is recommended for use in .properties and .yml files. Following configuration doesn't work.

cloud:
  aws:
    credentials:
      use-default-aws-credentials-chain: true
      instance-profile: false
      profile-name: my-profile

A working configuration has to be in camel case, which is inconsistent with Spring Boot recommendations:

cloud:
  aws:
    credentials:
      useDefaultAwsCredentialsChain: true
      instanceProfile: false
      profileName: my-profile

Spring Boot: 2.1.2.RELEASE
Spring Cloud AWS: 2.1.0.RELEASE (Greenwich.RELEASE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: coreAn issue related to core functionality - credentials, region resolutiontype: bugA general bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions