How to make form input and the value table be on the same page with Spring MVC and Thymleaf?
Solution 1:
I think it will be easy if you update your method as follows:
@GetMapping("/home")
public Model Home(Model model){
List<UserEntity> users = userDao.findBookAll();
model.addAttribute("users", users);
model.addAttribute("userForm", new UserEntity());
return model;
}