Annotation Type RequestAttribute

    • Optional Element Summary

      Optional Elements 
      Modifier and TypeOptional ElementDescription
      Stringname
      The name of the request attribute to bind to.
      booleanrequired
      Whether the request attribute is required.
      Stringvalue
      Alias for name().
      • name

        @AliasFor("value")
        String name
        The name of the request attribute to bind to.

        The default name is inferred from the method parameter name.

        Default:
        ""
      • required

        boolean required
        Whether the request attribute is required.

        Defaults to true, leading to an exception being thrown if the attribute is missing. Switch this to false if you prefer a null or Java 8 java.util.Optional if the attribute doesn't exist.

        Default:
        true