sres.as, estou com o seguinte problema.
antes so listava se eu fizesse um novo insert de dados. Agora nem isso mais. A lista nao aparece.
o method para listar:
@RequestMapping
public ModelAndView pesquisar(){
List<Aluno> todosAlunos = alunos.findAll();
ModelAndView mv = new ModelAndView("/escola/Aluno");
mv.addObject("alunos", todosAlunos);
return mv;
}
O html, talvez nao precise mais coloquei todo.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:th="http://www.thymeleaf.org"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorator="comum/LayoutPadrao">
<head>
<title>Lista de Alunos</title>
</head>
<section layout:fragment="conteudo01">
<table>
<tr>
<th>id</th>
<th>nome</th>
</tr>
<tr th:each="aluno:${alunos}">
<td th:text="${aluno.id}"></td>
<td th:text="${aluno.nome}"></td>
</tr>
</table>
</section>
</html>