I'm practicing with Spring JPA. I have the following code
@Controller
@RequestMapping("/empleados")
public class EmpleadoController {
@Autowired
@Qualifier("empleadoRepository")
private EmpleadoRepository empleadoRepository;
@GetMapping("/listarempleados")
public ModelAndView listarEmpleados() {
ModelAndView mav = new ModelAndView("listaempleados");
mav.addObject("empleados", empleadoRepository.findEmpleadoByAge());
return mav;
}
}
Inside my src / main / resources folder I have a templates folder with the name employeelist.html but when accessing the url link throws me that can not find the page.
Have I misconfigured my ModelAndView?