0

Entity class

class User {
  String name;
  LocalDateTime date;
}

And dto

class UserDto {
  String name;
  String date;
}

When I transform the dto into an entity object

ModelMapper modelMapper = new ModelMapper();
public User dtoToEntityConverter(UserDto dto) {
   return modelMapper.map(dto, User.class);
}

I get the date field of the dto object in this format:

"2021-03-17T23:05:33.371479"

and after the conversion I get NULL Why doesn't ModelMapper convert LocalDateTime?

alex
  • 324
  • 1
  • 8
  • 28
  • Does this answer your question? [Jackson converting LocalDatetime](https://stackoverflow.com/questions/53820977/jackson-converting-localdatetime) – M. Rizzo Jun 14 '23 at 19:40

0 Answers0