currently, I am working on a Spring Rest Endpoint (not Spring Boot) which I deploy to a Tomcat Servlet Container. It takes a Multipart form
@PostMapping(value = "/audit/{auditNumber}/file", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) public ResponseEntity<?> uploadFileForAudit(// @PathVariable String peNumber, // @RequestParam("category") String category, // @RequestParam("documents") MultipartFile file, // @RequestParam("description") String description, // @RequestHeader Map<String, String> headers) { System.out.println("category "+category); System.out.println("description "+description); When German Umlauts are sent as category or description, the console output looks like this:
category Prüfungsanordnung description öäü I have other Rest Resources, but they are working. Somehow this Resource has the wrong encoding. I suspect the Multipart-form to be the problem.
The frontend is not the problem. I can use JavaScript fetch or Postman and both have the same result.
Any hint is appreciated.