Skip to content

Instantly share code, notes, and snippets.

Created September 4, 2019 21:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save parzibyte/1e8580d8bbfec77a87896e603f75135b to your computer and use it in GitHub Desktop.
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