Я пытаюсь сохранить LocalDateTime в форме Thymeleafe, но безуспешно. Что у меня сейчас:
Модель:
public class Example{
...
private LocalDateTime creationDate;
...
Контроллер:
@PostMapping("/saveExample")
public String saveOrUpdate(@Valid @ModelAttribute("example") Example example, BindingResult bindingResult) {
Форма:
<input type="date" th:field="*{creationDate}"/>
Ошибка, что я Получение:
[Failed to convert property value of type 'java.lang.String' to required type 'java.time.LocalDateTime' for property 'creationDate'; nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [@javax.persistence.Column java.time.LocalDateTime] for value '2020-01-17'; nested exception is java.lang.IllegalArgumentException: Parse attempt failed for value [2020-01-17]]
Я пробовал много разных решений от Google, но безуспешно. Какие-либо предложения? С наилучшими пожеланиями.