Is there a recommended way to introduce restructurings/renamings into an externalized configuration while keeping backwards compatibility for consumers still relying on the old configuration structure?
For example, given a library used the following configuration structure defined via @ConfigurationProperties in the past:
old-properties:
an:
old-property: true
another:
custom-property: 1234
A new version of that library redefines the configuration to something like this:
my-library:
a-property: true
another-property: 1234
Is there a good way to deprecate the old structure while keeping compatibility for existing consumers for some time? Consumers using the new version of the library should still be able to use old-properties.an.old-property and have that automatically mapped to my-library.a-property.
I'm aware of the functionality to use additional configuration metadata to mark a property as deprecated, but I'm explicitly looking for a way to support both versions to ease migration.