You can probably do exactly what is done with org.springframework.http.converter.json.MappingJacksonHttpMessageConverter . Since it is not the final class, you can get your converter from this:
class MyCustomVndConverter extends MappingJacksonHttpMessageConverter{ public MyCustomVndConverter (){ super(MediaType.valueOf("application/vnd.myservice+json")); } }
then register the converter this way:
<mvc:annotation-driven> <mvc:message-converters register-defaults="true"> <bean class="MyCustomVndConverter "/> </mvc:message-converters> </mvc:annotation-driven>
It should just work with these changes.
source share