I'm having a problem because I'm learning to use the GET and POST methods using Spring Boot , but only controller
I can manage to show on the screen. I am using JSP already configured
no aplication.propertties
.
spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp
The question is that I have 3 tables in MySQL one and the training and the other and courses
@Controller
public class MainControllerCur {
@Autowired
AppCursosRepo appRepocur;
@RequestMapping("/cursos")
public ModelAndView doHomeCur(){
ModelAndView mv = new ModelAndView("cursos");
mv.addObject("listscur",appRepocur.findAll());
return mv;
}
}
@Controller
public class MainControllerTr {
@Autowired
AppTreinamentoRepo appRepo;
@RequestMapping("/treinamento")
public ModelAndView doHome(){
ModelAndView mv = new ModelAndView("index");
return mv;
}
But here is the employee and the only one who does not generate a server view when I call JSP .
@Controller
public class MainControllerFunc {
@Autowired
AppFuncionarioRepo appRepofunc;
@RequestMapping("/funcionario")
public ModelAndView doHomeFunc(){
ModelAndView mv = new ModelAndView("funcionario");
mv.addObject("listsfunc",appRepofunc.findAll());
return mv;
}
}
What is strange and that is exactly the same as the other two only changes the call /funcionario
compila normal without no error no error log appears in the console.
The error is always this
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Sat Oct 14 01:14:19 BRT 2017
There was an unexpected error (type=Not Found, status=404).
/WEB-INF/jsp/funcionario.jsp
If anyone can give me an explanation I'll be grateful.