Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @RequestMapping("/add")
- public String addProduct(Model model,
- @RequestParam String name,
- @RequestParam String description,
- @RequestParam String imgUri,
- @RequestParam Double precio
- )
- {
- Product product = new Product();
- product.setName(name);
- product.setDescription(description);
- product.setImgUri(imgUri);
- product.setPrecio(precio);
- DataHelper.addItem(product);
- initModel(model);
- return "hoteles";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement