This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
@Controller | |
@RequestMapping(path = "/ventas") | |
public class VentasController { | |
@Autowired | |
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