Created
April 26, 2020 14:50
-
-
Save ntub46010/ab4f691a60f328b6de30a3f24bbf9c17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@GetMapping("/products/{id}") | |
public ResponseEntity<Product> getProduct(@PathVariable("id") String id) { | |
Product product = new Product(); | |
product.setId(request.getId()); | |
product.setName(request.getName()); | |
product.setPrice(request.getPrice()); | |
return ResponseEntity.ok().body(product); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment