[BUG] Spring conditional annotation @ConditionalOnProperty prevents creating of bean in-casse Azure key vault secrets name is in camelCase, with Groovy framework. #23815
Labels
azure-spring
All azure-spring related issues
azure-spring-keyvault
Spring keyvault related issues.
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Environment
Groovy: 2.5.10
spring-boot-starter: 2.5.2
azure-spring-boot-starter-keyvault-secrets: 3.6.0
Summary
Spring conditional annotation @ConditionalOnProperty not satisfying the condition when the secret is in camel case**(testing-propInCamelCase)** in the azure key vault.
Whereas able to read the properties using @value annotation.
To Reproduce
Create a secret as testing-propInCamelCase in the azure key vault with any value.
Try to create a spring bean using the property using the @ConditionalOnProperty, in the below, you will see the first bean is not getting created whereas the second one is.
Expected behavior
As Azure is lowering the case of the properties/secrets, the conditional property should work for both cases as it's working in the below case while reading the secrets with @value annotation. In both cases, the value is loading from the secrets.
Is there any reason it is working while reading the properties not while using the conditional on a property?
The text was updated successfully, but these errors were encountered: