Annotation Interface YmlIgnore


@Target({FIELD,METHOD}) @Retention(RUNTIME) @Documented public @interface YmlIgnore
YML Ignore - Excludes a field from YAML binding YML 忽略 - 将字段从 YAML 绑定中排除

This annotation prevents a field from being included in YAML serialization/deserialization.

此注解阻止字段包含在 YAML 序列化/反序列化中。

Features | 主要功能:

  • Exclude fields from YAML serialization and deserialization - 从 YAML 序列化和反序列化中排除字段
  • Applicable to fields and methods - 适用于字段和方法

Usage Examples | 使用示例:

public class UserConfig {
    private String name;

    @YmlIgnore
    private String password;
}

Security | 安全性:

  • Thread-safe: Yes (annotation is inherently immutable) - 线程安全: 是(注解本身不可变)
  • Null-safe: N/A - 空值安全: 不适用
Since:
JDK 25, opencode-base-yml V1.0.0
Author:
Leon Soo www.LeonSoo.com
See Also: