azure-spring-boot-samples
azure-spring-boot-samples copied to clipboard
[BUG] Wrong configuration properties for Cosmos in Spring Cloud App Configuration App samples
Describe the bug
This bug was found in this https://github.com/Azure/azure-sdk-for-java/issues/33165. There are two samples in https://github.com/Azure-Samples/azure-spring-boot-samples/blob/main/appconfiguration/azure-spring-cloud-appconfiguration-config/azure-spring-cloud-appconfiguration-config-convert-sample/, the initial one use KV to store the Cosmos key and other properties, and the complete one uses App Configuration + KV to store the configurations.
The bootstrap.properties still uses COSMOS-KEY as the property name reference, which is not correct and over-complicated in two ways.
- We use a key format like
COSMOS-KEYin KV because Key Vault doesn't support.in the secret name, but App Configuration can perfectly support that. - When storing configurations in the App Configuration service, there's no need to list these properties in the
bootstrap.propertiesorapplication.propertiesanymore.
Expected behavior We should:
- Step 8 & 9 in convert to using App Configuration section, the key should be like
/application/spring.cloud.azure.cosmos.*instead of/application/azure.cosmos.* - Remove the three
spring.cloud.azure.cosmos.*properties from the bootstrap.properties file.