@GetMapping("/products/{id}")
public Product getProduct(@PathVariable("id") long productId) {
// retrieve and return the product with the given id
}
@GetMapping("/products/{id}")
@ResponseBody
public Product getProduct(@PathVariable("id") long productId) {
// retrieve and return the product with the given id
}