注释类型 Required
@Deprecated @Retention(RUNTIME) @Target(METHOD) public @interface Required
已过时。as of 5.1, in favor of using constructor injection for required settings (or a customInitializingBean
implementation)Marks a method (typically a JavaBean setter method) as being 'required': that is, the setter method must be configured to be dependency-injected with a value.Please do consult the javadoc for the
RequiredAnnotationBeanPostProcessor
class (which, by default, checks for the presence of this annotation).- 从以下版本开始:
- 2.0
- 作者:
- Rob Harrop
- 另请参阅:
RequiredAnnotationBeanPostProcessor