When applying @Configuration(prefix = "foo") on an interface, we would expect that any @PropertyNames specified in the interface would automatically look for foo.[names], but this does not apply when there are parameters specified, instead using the PropertyName directly.
foo.bar: "GOOD"
foo.baz: "ALSO GOOD"
bar: "ALSO BAD"
Expected
getFooBar() --> GOOD
getFoo("bar") --> GOOD
getFoo("baz") --> ALSO GOOD
Actual
getFooBar() --> GOOD
getFoo("bar") --> ALSO BAD
getFoo("baz") --> BAD // From the default value
Issue is in ConfigProxyFactory.createParameterizedProperty.
Changing this to only the correct behavior would be breaking for many clients, we will include backward compatibility for cases in which clients specify the prefix (e.g. in the above example, a name = "foo.${0}" would also produce the same result).
This would however still be breaking for clients that specified a prefix at the top level config, and then ignored it in the body.
When applying @Configuration(prefix = "foo") on an interface, we would expect that any @PropertyNames specified in the interface would automatically look for foo.[names], but this does not apply when there are parameters specified, instead using the PropertyName directly.
Example
Given config
Expected
Actual
Issue is in ConfigProxyFactory.createParameterizedProperty.
Changing this to only the correct behavior would be breaking for many clients, we will include backward compatibility for cases in which clients specify the prefix (e.g. in the above example, a name = "foo.${0}" would also produce the same result).
This would however still be breaking for clients that specified a prefix at the top level config, and then ignored it in the body.