Skip to content

Instantly share code, notes, and snippets.

Created September 4, 2019 21:59
What would you like to do?
package me.parzibyte.sistemaventasspringboot;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@RequestMapping(path = "/ventas")
public class VentasController {
VentasRepository ventasRepository;
@GetMapping(value = "/")
public String mostrarVentas(Model model) {
model.addAttribute("ventas", ventasRepository.findAll());
return "ventas/ver_ventas";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment