Ich verwende Spring Controller, um einige Anfragen zu bearbeiten. Ich bekomme über Ausnahme. Ich habe application/json
, application/xml
usw. gehandhabt. Aber ich bin nicht sicher über */*
und wie es im Controller behandelt werden sollte. Hier ist mein Controller-Code. HierHandhabung */* Inhaltstyp Spring Boot
@RequestMapping(value = "/handle", method = RequestMethod.POST)
public @ResponseBody Response handleRequest(HttpServletRequest request, @RequestBody TestDTO testDTO, HttpServletResponse httpServletResponse) throws Exception {
}
ist die Ausnahme:
Unexpected error: Content type '*/*;charset=UTF-8' not supported
org.springframework.web.HttpMediaTypeNotSupportedException: Content type '*/*;charset=UTF-8' not supported
Bitte lassen Sie mich wissen, ich bin etwas fehlt.