注释类型 NonNullFields
@Target(PACKAGE) @Retention(RUNTIME) @Documented @Nonnull @TypeQualifierDefault(FIELD) public @interface NonNullFields
A common Spring annotation to declare that fields are to be considered as non-nullable by default for a given package.Leverages JSR-305 meta-annotations to indicate nullability in Java to common tools with JSR-305 support and used by Kotlin to infer nullability of Spring API.
Should be used at package level in association with
Nullable
annotations at field level.- 从以下版本开始:
- 5.0
- 作者:
- Sebastien Deleuze
- 另请参阅:
NonNullApi
,Nullable
,NonNull