NullPointerException error in Spring Boot controller object

Your JSON object is named ToDoDto but it is mapped to toDoDto in your ToDoRequest class.

Assuming you are using Jackson for data-binding, you can annotate toDoDto defined in ToDoRequest with @JsonProperty to override the property name:

@JsonProperty("ToDoDto")
ToDoDto toDoDto;

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top