@RequestMapping(value = "/invoice/{id}", method = RequestMethod.GET) public Invoice getInvoiceById(@PathVariable int id) { Invoice invoice = invoiceService.getInvoiceById(id); return addLinks(invoice); }
@RequestMapping(value = "/invoice", method = RequestMethod.GET) public InvoiceList getInvoiceByCustomerId(@RequestParam("customerId") int customerId) { return addLinks(invoiceService.getInvoiceByCustomerId(customerId), customerId); }