Annotation Interface Pattern


@Target(FIELD) @Retention(RUNTIME) public @interface Pattern
Validates that a String config value matches the specified regular expression. If the value does not match, it is reset to the field's default value and a warning is logged.

验证字符串配置值是否匹配指定的正则表达式。如果不匹配,将重置为字段默认值并记录警告。

See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The regular expression pattern to match against.
  • Element Details

    • regex

      String regex
      The regular expression pattern to match against.