注释类型 DeprecatedConfigurationProperty
@Target(METHOD) @Retention(RUNTIME) @Documented public @interface DeprecatedConfigurationProperty
Indicates that a getter in aConfigurationProperties
object is deprecated. This annotation has no bearing on the actual binding processes, but it is used by thespring-boot-configuration-processor
to add deprecation meta-data.This annotation must be used on the getter of the deprecated element.
- 从以下版本开始:
- 1.3.0
可选元素概要
可选元素 修饰符和类型 可选元素 说明 String
reason
The reason for the deprecation.String
replacement
The field that should be used instead (if any).
replacement
String replacement
The field that should be used instead (if any).- 返回:
- the replacement field
- 默认值:
- ""