Annotation Interface HandleVariable


@Target(PARAMETER) @Retention(RUNTIME) @Documented public @interface HandleVariable
Annotation that binds a method variable to a bean handle.

Example

 
  @Controller("/api")
  public class MyController {

      // Incoming request looks like "/config/some-bean-handle"
      @PostMapping("/config/{handle}")
      public ConfigBean getConfig(@HandleVariable("handle") ConfigAware<?> bean) {
          return bean.getConfig();
      }
  }
 
 
Since:
1.0
Version:
2022-08-30
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the variable to map to.
  • Element Details

    • value

      String value
      The name of the variable to map to.
      Default:
      ""