There is a service:
@RestController @RequestMapping("/generals") public class Manager { @RequestMapping(value = "/request", method = RequestMethod.POST) public ResponseEntity<String> createRequestFilter( HttpServletRequest request, @RequestBody String requestBody ) throws IOException { } } I send him a POST request with JSON. Type application\json .
I get the error:
com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.lang.String out of START_OBJECT token that is, the request arrives, but falls on trying to cast Json into a String .
Tried to change from String to ObjectNode - it all started.
But, I would like to understand what's the matter.
TestString, and the spring should be"TestString"- damintsew