Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
private void limpiarCarrito(HttpServletRequest request) {
this.guardarCarrito(new ArrayList<>(), request);
}
@GetMapping(value = "/limpiar")
public String cancelarVenta(HttpServletRequest request, RedirectAttributes redirectAttrs) {
this.limpiarCarrito(request);
redirectAttrs
.addFlashAttribute("mensaje", "Venta cancelada")
.addFlashAttribute("clase", "info");
return "redirect:/vender/";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment