Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support deprecation / refactoring of configuration properties #4967

Open
tobiasschaefer opened this issue Feb 21, 2021 · 0 comments
Open

Support deprecation / refactoring of configuration properties #4967

tobiasschaefer opened this issue Feb 21, 2021 · 0 comments
Labels
type: enhancement New feature or request

Comments

@tobiasschaefer
Copy link
Contributor

As requested by @graemerocher I'm filing an issue, see also #4958

Configuration properties work well to support type safe classes representing the configuration.

However, I'm missing:

  • marking configuration properties as deprecated - maybe log a warning if they are used
  • refactoring configuration properties: Support a new and deprecated structure in parallel after renaming packages or properties. For example I might want to rename "x.y.z" to "x.z":

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();
}

I would be nice to support x.z but fallback to the value x.y.z if it is set.

@graemerocher graemerocher added the type: enhancement New feature or request label Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants