Annotation Interface PathVariable


@Retention(RUNTIME) @Target(PARAMETER) public @interface PathVariable
Annotation used to indicate that a method parameter should be bound to a URI template variable.

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
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
  • Element Details

    • value

      String value
      Default:
      ""