- Cloud-Native Applications in Java
- Ajay Mahajan Munish Kumar Gupta Shyam Sundar
- 55字
- 2021-06-24 19:07:15
Writing a product service
For the sake of simplicity, our product service has two functions:
- List<int> getProducts(int categoryId)
- Product getProduct(int prodId)
The intent of the two methods is quite clear. The first returns a list of product IDs given a category ID, and the second returns product details (as an object) given a product ID.