groupe-sii / ogham

Sending email, sms or whatever is a piece of cake
https://groupe-sii.github.io/ogham/
Apache License 2.0
21 stars 15 forks source link

PropertyBridge: override properties in wrong order #37

Closed aurelien-baudet closed 7 years ago

aurelien-baudet commented 9 years ago

When properties are overriden by different profiles or with external configuration, the lower priority values are used by Ogham.

The higher priority should be used instead. The quick fix is to keep the current order and just check if the key is already set. The other possible fix is to revert the list order.

But I think that properties should be abstracted in Ogham like it is done by Spring. It will enable the developer to provide any kind of configuration (not only properties). Then the PropertiesFiller should not try to get all properties starting with a key but be more clever by accessing when needed the property value using provided prefixes. It needs to reorganize the way PropertiesFiller works.

aurelien-baudet commented 7 years ago

The bug is fixed. Creating a new issue for improvements