@HystrixCommand @RequestMapping(value = "/order", method = RequestMethod.POST) public String order( HttpServletRequest request, HttpSession session, Orderhistory order, Model model) { order.setUsername(session.getAttribute("username").toString()); order.setProduct(request.getParameter("product")); orderClient.saveOrder(order); return "onlinestore/thankyou"; }
@HystrixCommand @RequestMapping("/menu") public String menu(Model model, HttpSession session) throws JsonParseException, JsonMappingException, IOException { if (session.getAttribute("username") == null) { return utils.returnLogin(); } model.addAttribute( "order", orderClient.getOrderByUser(session.getAttribute("username").toString())); return "onlinestore/menu"; }