Closed samisnotinsane closed 6 years ago
A Spring forum page (JSON HttpMediaTypeNotSupportedException) post suggests that objects must be serializable and deserializable to get rid of this error.
A Spring forum page (JSON HttpMediaTypeNotSupportedException) post suggests that objects must be serializable and deserializable to get rid of this error.
The problem in the above thread is related to submitting a JSON whereas this bug is related to an http form. This link may be more relevant.
A Spring forum page (JSON HttpMediaTypeNotSupportedException) post suggests that objects must be serializable and deserializable to get rid of this error.
The problem in the above thread is related to submitting a JSON whereas this bug is related to an http form. This link may be more relevant.
Removing @RequestBody
annotation from the following method in LessonController
fixed the issue.
public void create(@RequestBody Lesson lesson) {
lessonService.save(lesson);
}
The above exception occurs when 'Save' is clicked from add lesson form. In addition, an HTTP 415 is returned to client.