Annotation Interface ApiAfterFind
Registers an
AfterFind hook to be invoked after the query
results are returned by the proxy-api-controller interceptor.
Place this annotation on a method of an ApiFindController interface.
The framework calls the specified AfterFind implementation with the
list of results before returning the response, allowing post-processing such as
enrichment, filtering, or side effects.
Example
@ApiFindController
public interface OrderController {
@PostMapping("/orders/search")
@ApiAfterFind(OrderEnricher.class) // enriches results with extra data
List<OrderDto> search(@RequestBody OrderFilter filter);
}
- Author:
- Francesco Baldi
- See Also:
-
Required Element Summary
Required Elements
-
Element Details
-
value
TheAfterFindimplementation to invoke after the query returns results. The class must be a valid Spring bean or have a no-arg constructor.- Returns:
- the after-find hook class; must not be
null
-