Skip to content

Instantly share code, notes, and snippets.

@atesibrahim
Created June 29, 2022 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atesibrahim/5eb455807f939d2c586942ce3f94ad72 to your computer and use it in GitHub Desktop.
Save atesibrahim/5eb455807f939d2c586942ce3f94ad72 to your computer and use it in GitHub Desktop.
@RestController
@RequestMapping("/products")
@RequiredArgsConstructor
public class ProductController {
private final ProductService productService;
@PostMapping
public ProductDispenseResponse dispense(@Valid @RequestBody ProductRequest productRequest) {
return productService.dispense(productRequest);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment