Suppose I have a class Foo
and this code:
@ConfigurationProperties
public class Config {
@NestedConfigurationProperty Foo foo;
}
First of all I understand in order to use a class Foo
like above that is not an inner class of Config
, I MUST use @NestedConfigurationProperty. is that correct?
Next, I have to author application.properties
like so:
foo.prop1=xxx
foo.prop2=xxx
...
If I use any other prefix except foo
in application.properties
, the parameter is not parsed properly. What I would like to do is be able to say:
bar.prop1=xxx
bar.prop2=xxx
...
How can I do this?