Closed as not planned
Description
The following SO question illustrates the problem well.
Long story short, sometimes I want to have a property in my config file, which name is different from the object field. As far as I know, and seems it is still the case, there is no way to do it other than generating some custom setters, but that seems to be a workaround, not a solution.
It would be great to introduce a new annotation (or another way, but the annotation seems to be the smoothest) to handle this case, like:
class MyS3Config {
/**
* This annotation of course does not exists, but this is just an example
* I cannot have an identifier named 'public' in Java, so I have to do custom mapping
*/
@ConfigurationPropertiesMapping(property = "public")
private String publicBucket;
}
Thanks in advance