Annotation Interface RouteInfo


@Target(TYPE) @Retention(RUNTIME) public @interface RouteInfo
Annotation to specify routing information for a request handler. This annotation defines the endpoint, HTTP method, and whether a non-null body is enforced for the annotated request handler class.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Specifies the endpoint for the request handler.
    Specifies the HTTP method for the request handler.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Indicates whether a non-null body is enforced for requests handled by this route.
  • Element Details

    • endpoint

      String endpoint
      Specifies the endpoint for the request handler.
      Returns:
      the endpoint path (e.g., "/resource")
    • method

      HttpMethod method
      Specifies the HTTP method for the request handler.
      Returns:
      the HTTP method (e.g., GET, POST)
    • enforceNonNullBody

      boolean enforceNonNullBody
      Indicates whether a non-null body is enforced for requests handled by this route. By default, this is set to false.
      Returns:
      true if a non-null body is required, otherwise false
      Default:
      false