How to refactor configuration properties? #4958
-
How can configuration properties be refactored while still supporting the old structure? E.g. I have a supported property "x.y..z" and I want to remove "y" so that it is "x.z" but I still want to support x.y.z and preferably log a warning if it is used? This is the existing structure: @ConfigurationProperties( "x")
public interface Configuration {
@NotNull
Y getY();
@ConfigurationProperties("y")
interface Y {
@Bindable(defaultValue = "false")
boolean isZ();
}
} This would be the new structure but it misses "y" completely: @ConfigurationProperties( "x")
public interface Configuration {
@Bindable(defaultValue = "false")
boolean isZ();
} So how must I implement to support both? Do you have any hints? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Don't think this is currently supported with interfaces, but I recommend reporting an issue with a feature request and we can see what we can do |
Beta Was this translation helpful? Give feedback.
Don't think this is currently supported with interfaces, but I recommend reporting an issue with a feature request and we can see what we can do