批注接口 DeprecatedConfigurationProperty


@Target(METHOD) @Retention(RUNTIME) @Documented public @interface DeprecatedConfigurationProperty
Indicates that a getter in a @ConfigurationProperties object is deprecated. This annotation has no bearing on the actual binding processes, but it is used by the spring-boot-configuration-processor to add deprecation meta-data.

This annotation must be used on the getter of the deprecated element.

从以下版本开始:
1.3.0
作者:
Phillip Webb, Scott Frederick
  • 可选元素概要

    可选元素
    修饰符和类型
    可选元素
    说明
    The reason for the deprecation.
    The field that should be used instead (if any).
    The version in which the property became deprecated.
  • 元素详细资料

    • reason

      String reason
      The reason for the deprecation.
      返回:
      the deprecation reason
      默认值:
      ""
    • replacement

      String replacement
      The field that should be used instead (if any).
      返回:
      the replacement field
      默认值:
      ""
    • since

      String since
      The version in which the property became deprecated.
      返回:
      the version
      默认值:
      ""