SpringBoot Webflux cannot return application/xml
问题 In my reactive REST API I'm trying to return an XML response. However, I always get a JSON , namely 406 NOT_ACCEPTABLE . Any idea why? @RestController @RequestMapping(path = "/xml", produces = APPLICATION_XML_VALUE) public class RestApi { @GetMapping(path = "/get") public Publisher<ResponseEntity> get() { return Mono.just(ResponseEntity.ok().contentType(APPLICATION_XML).body(new Datta("test"))); } @PostMapping(path = "/post", consumes = APPLICATION_XML_VALUE) public Publisher<ResponseEntity