From 235858e4e51a09759a35371f11116dfbdc2e9ab5 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Sat, 13 Jul 2019 11:00:43 +0100 Subject: [PATCH] Exposes supported mime types in Jaxb2Decoder Closes gh-23278 --- .../org/springframework/http/codec/xml/Jaxb2XmlDecoder.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spring-web/src/main/java/org/springframework/http/codec/xml/Jaxb2XmlDecoder.java b/spring-web/src/main/java/org/springframework/http/codec/xml/Jaxb2XmlDecoder.java index 0778932274..cf81970e9b 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/xml/Jaxb2XmlDecoder.java +++ b/spring-web/src/main/java/org/springframework/http/codec/xml/Jaxb2XmlDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -82,6 +82,10 @@ public class Jaxb2XmlDecoder extends AbstractDecoder { super(MimeTypeUtils.APPLICATION_XML, MimeTypeUtils.TEXT_XML); } + public Jaxb2XmlDecoder(MimeType... supportedMimeTypes) { + super(supportedMimeTypes); + } + /** * Configure a processor function to customize Unmarshaller instances.