This is my controller mapping, I need to print all the properties of the list objects in my view.
@RequestMapping(value = "/get" , method = RequestMethod.GET)
@ModelAttribute("todolist")
public List<Todo> getuser() {
return (List<Todo>) todoRepository.findAll();
}
This is my View, and a link to my GitHub project.
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head lang="en">
<head>
</head>
<body>
<table>
<tr th:each="message : ${todolist}">
<td th:text="${todolist.title}">Title</td>
<td th:text="${todolist.description}">Description</td>
</tr>
</table>
</body>
</html>