coveooss / spring-boot-parameter-store-integration

A tiny library used to integrate AWS Parameter Store in Spring Boot's powerful property injection.
MIT License
45 stars 19 forks source link

Can you support kebab-case? #160

Open namhokim opened 2 years ago

namhokim commented 2 years ago

In Spring Boot, YAML property allows Camel case, kebab case, or underscore notation. But this library support only Camel case. Can you support kebab-case notation?

ref. https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.external-config.typesafe-configuration-properties.relaxed-binding

fredboutin commented 2 years ago

You mean instead of AWS' slash '/' ? This is intended since AWS use / in parameter store and it gives us a handle to determine if the parameter has to be fetched from AWS Parameter Store. If we support something else (like kebab-case, camelCase) then every single property is going to be looked up in the param store and you will for sure be throttled. This means every time the application hits an @Value it's going to make a call to the param store. Spring uses this a lot internally so it means a lot of calls.

namhokim commented 2 years ago

No, I intended like below example:

aws-parameter-store-property-source:
  enabled: true
  halt-boot: true
  multi-region:
    ssm-client:
      regions: us-east-1,us-east-2

not only:

awsParameterStorePropertySource:
  enabled: true
  haltBoot: true
  multiRegion:
    ssmClient:
      regions: us-east-1,us-east-2
fredboutin commented 2 years ago

Right, I'll keep this open so we can look at it if you have time. If you want to give a shot at a PR, you can too.