Hi all, In current config provider implementation, if we need to generate configuration object by reading deployment yaml, we need to add Configuration annotation with a namespace to the bean class.
But there can be situation where adding annotation to the bean class is not possible. but we still need to generate the bean object by reading the deployment yaml. This limitation occurred because when we are generating bean object from the provider, we get the namespace of the particular bean class from the Configuration annotation. If there is no annotation define in the class or namespace not exists in the deployment.yaml, system generates the object with default values. In order to overcome this scenario, we are going to provide new method in configProvider service object. So that user can provide the namespace and as well as the bean class like below, <T extends Object> T getConfigurationObject(String namespace, Class<T> > configClass) When we call the method, we first check the configuration for the namespace, if configuration exists in deployment.yaml, system generates bean object by overriding the configuration of the namespace. Here we are not checking the namespace of the bean class. If the given namespace is null or doesn't have configuration for the namespace. then system checks the bean namespace and generate the bean object. Appreciate your input on this. *Danesh Kuruppu* Senior Software Engineer | WSO2 Email: [email protected] Mobile: +94 (77) 1690552 Web: WSO2 Inc <https://wso2.com/signature>
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
