Witam mam pewien problemik z formularzem z thymeleaf
a wiec robie jakiś bląd po stronie formularza ale nie moge go zlokalizowac od dłuzszego czasu
@PostMapping("/add-post")
public String greeting(Post post, Model model) {
System.out.println(post);
model.addAttribute(new Post());
System.out.println(post);
return "redirect:post";
}
<form th:action="@{/add-post}" th:object="${post}" method="post">
<div class="form-group">
<label for=>Author</label>
<input type="text" th:field="*{name}" class="form-control" >
</div>
<div class="form-group">
<label >opis</label>
<input type="text" th:field="*{desc}" class="form-control" >
<input type="hidden" th:field="*{time}" class="form-control" >
</div>
<button type="submit" class="btn btn-primary">Wyslij</button>
</form>