3 comments on “Advanced config with configuration meta-data in Spring Boot
  1. snicoll says:

    Thanks for the article!

    FYI, you can also annotate the getter of the deprecated property with @DeprecatedConfigurationProperty and we will generate that meta-date entry automatically for you. When you deprecate a property, it is backed by a public getter/setter anyway so that should be included in the deprecation as well.

    “Value providers are available only to manually provided hints”. I find this a bit confusing. You can add value provider to any key (including those generated automatically). All you need to do is to add a hint entry that references the key you want to customize.

    • jakub says:

      Hi Stéphane, thanks for your insights on both articles. I must have missed @DeprecatedConfigurationProperty annotation in the latest Spring Boot documentation (http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/). If it is not there it might be worth including. As for the hints remark, this might be caused by my English 🙂 All I meant to say is that one needs to specify it manually in additional-spring-configuration-metadata.json file. Or is there any other way of doing it? Anyways, I will modify the article according to your comment tomorrow.

      • snicoll says:

        Good catch for the documentation, I’ve created #5118 to fix that. As for the hints, yep you can only specify them manually. Thanks!

Leave a Reply