Annotation Interface ApiFind


@Retention(RUNTIME) @Target({METHOD,TYPE}) public @interface ApiFind
Binds a controller interface or method to a specific JPA entity and its primary-key type, enabling the proxy-api-controller framework to resolve and execute the correct JpaService at runtime.

When placed on a type (interface) annotated with ApiFindController, all methods of that interface inherit the entity binding unless they declare their own @ApiFind at method level.

Example


 @ApiFindController
 @ApiFind(entity = Product.class, id = Long.class)
 public interface ProductController {

     @GetMapping("/products")
     List<ProductDto> search(@RequestBody ProductFilter filter);
 }
 
Author:
Francesco Baldi
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The JPA entity class that this controller method queries.
    The type of the entity's primary key (e.g., Long.class, UUID.class).
  • Element Details

    • entity

      Class<?> entity
      The JPA entity class that this controller method queries.
      Returns:
      the entity class; must not be null
    • id

      Class<?> id
      The type of the entity's primary key (e.g., Long.class, UUID.class).
      Returns:
      the primary-key class; must not be null