Created
April 26, 2020 14:44
-
-
Save ntub46010/b3b095b469fc9626ac05ee29b84db2fc 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
@RestController | |
@RequestMapping(produces = MediaType.APPLICATION_JSON_VALUE) | |
public class ProductController { | |
@GetMapping("/products/{id}") | |
public Product getProduct(@PathVariable("id") String id) { | |
Product product = new Product(); | |
product.setId(id); | |
product.setName("Romantic Story"); | |
product.setPrice(200); | |
return product; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment