Created
October 6, 2017 20:50
-
-
Save Senhordim/3932b98a7516c9c7f11387dd78d45edf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@PutMapping(value="/{id}") | |
public Product updateProductWithId(@PathVariable Long id, Product product) { | |
Product currentProduct = productDAO.findOne(id); | |
currentProduct.setCode(product.getCode()); | |
currentProduct.setDescription(product.getDescription()); | |
currentProduct.setUnitPrice(product.getUnitPrice()); | |
return productDAO.save(product); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment