Annotation Interface GetMapping


@Target(METHOD) @Retention(RUNTIME) public @interface GetMapping
Annotation for mapping HTTP GET requests onto specific handler methods.

Usage Example:

 
 @RestController
 public class MyRestController implements BringServlet {

      @GetMapping(path = "/resource/{id}")
      public ResponseEntity<Resource> getResource(@PathVariable Long id) {
          // Your implementation logic here
      }
    }
  
 
Since:
1.0
Author:
Blyzhnytsia Team
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The URL path or pattern for mapping HTTP GET requests to the annotated method.
  • Element Details

    • path

      String path
      The URL path or pattern for mapping HTTP GET requests to the annotated method.
      Returns:
      the URL path or pattern for GET requests
      Default:
      ""