@RequestMapping(value = "/product/add", method = RequestMethod.POST)
public boolean add(@RequestBody Product product) {
return productService.add(product);
}
@RequestMapping(value = "/product/get/{id}", method = RequestMethod.GET)
public Product get(@PathVariable("id") Long id) {
return productService.get(id);
}
@RequestMapping(value = "/product/list", method = RequestMethod.GET)
public List<Product> list() {
return productService.list();