For example, there is a configuration property class:
@Getter
@Setter
@ConfigurationProperties("foo")
@EnableConfigurationProperties(FooProperties.class)
public class FooProperties {
@NestedConfigurationProperty
private Map<String, BarProperties> bars;
@Getter
@Setter
public static class BarProperties {
private String testStr;
private BarEnums barEnum;
}
public enum BarEnums {
BAR_1,BAR2
}
}
and there is the metadata generated by the configuration-processor
{
"groups": [
{
"name": "foo",
"type": "com.xxx.config.props.FooProperties",
"sourceType": "com.xxx.config.props.FooProperties"
},
{
"name": "foo.bars",
"type": "java.util.Map",
"sourceType": "com.xxx.config.props.FooProperties"
}
]
}
The only thing that can be done is to let the IDE get simple configuration hints by supplementing the generic type of the complete Map. But as a configuration provider, I want users to get hints like other metadata in this similar situation, including sourceType, description, deprecate, possible value, etc. It is hoped that configuration metadata will be extended to support similar situations.
Comment From: wilkinsona
Thanks for the suggestion, @TAlcantara. I believe that this is a duplicate of https://github.com/spring-projects/spring-boot/issues/9945.
Comment From: TAlcantara
Thanks for the suggestion, @TAlcantara. I believe that this is a duplicate of #9945.
thanks. I have read the issue you provided. Does it mean that there is no feature to optimize this problem so far, but it may be added in a future version update?
Comment From: wilkinsona
Yes, that's right.