spring-cloud-aws icon indicating copy to clipboard operation
spring-cloud-aws copied to clipboard

[Parameter Store] Strip leading dot from imported parameters

Open matthias-seibert-tng opened this issue 1 year ago • 2 comments

Type: Bug

Component: Parameter Store

Describe the bug The library adds a leading dot (.) to imported variables, when using the setup as suggested in the readme (spring.config.import=aws-parameterstore:/config/spring)

This leads to problems when importing variables stored in a nested hierarchy. For example, if a variable stored at /config/spring/my/message, it is imported as .my.message, and cannot be accessed via @Value("${my.message}").

Changing the config to spring.config.import=aws-parameterstore:/config/spring/ resolves this problem, but it would be a nice feature to strip the leading dot in the library.

matthias-seibert-tng avatar Oct 25 '23 12:10 matthias-seibert-tng

Hey @matthias-seibert-tng , since we are loading by path it is important to end with the / . It only makes sense since you want all on the path.

MatejNedic avatar Nov 01 '23 08:11 MatejNedic

I can understand that, but then it would be great if you could update the docs, because in the examples there, there is no slash at the end. See this screenshot:

Screenshot

matthias-seibert-tng avatar Nov 06 '23 07:11 matthias-seibert-tng

Closed in #1086

maciejwalkowiak avatar Mar 10 '24 23:03 maciejwalkowiak