Spring MVC: Get request body as String May 13, 2019 The following code will print the request headers and the request body as a plain String. @PostMapping("/process") public void process(HttpEntity<String> request) { System.out.println("headers: "+request.getHeaders()); System.out.println("body: "+request.getBody()); }