How to use defaultValue for LocalDate using Mapstruct? I was trying everything and nothing works. My failed attempts below:
@Mapping(target = "bornDate", defaultValue = "2019-10-11", dateFormat = "yyyy-MM-dd")
Person kidToPerson(Kid kid);
@Mapping(target = "bornDate", defaultExpression = "java(LocalDate.MIN)", dateFormat = "yyyy-MM-dd")
Person kidToPerson(Kid kid);
@Mapping(target = "bornDate", defaultExpression = "java(LocalDate.parse(2019-01-01))", dateFormat = "yyyy-MM-dd")
Person kidToPerson(Kid kid);
I just want to have some default value after mapping in my property LocalDate bornDate
from Person.