Skip to content

Instantly share code, notes, and snippets.

@manuelmazzuola
Created September 16, 2022 14:51
Show Gist options
  • Save manuelmazzuola/f5a284e6b2de7543fcc32bea3a72b5d6 to your computer and use it in GitHub Desktop.
Save manuelmazzuola/f5a284e6b2de7543fcc32bea3a72b5d6 to your computer and use it in GitHub Desktop.
@ApiOperation( value = "Retrieve products" )
@PostMapping
public List<ProductDTO> getAll(
@Valid ProductQuery query,
@Valid PageRequestDTO pageRequest,
HttpServletResponse response )
{
Page<Product> products = getProducts( query, pageRequest, true );
setPagedHeaders( response, products );
return conversionService.convertList( products.getContent(), ProductDTO[].class );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment