Support wildcard style media types in JSON converters
Add "application/*+json" to supported media types for both Jackson message converters. Issue: SPR-7905
This commit is contained in:
committed by
Rossen Stoyanchev
parent
2e1a68893d
commit
e16c40359a
@@ -45,7 +45,6 @@ public abstract class AbstractMappingJacksonHttpMessageConverterTests<T extends
|
||||
|
||||
protected static final String NEWLINE_SYSTEM_PROPERTY = System.getProperty("line.separator");
|
||||
|
||||
|
||||
private T converter;
|
||||
|
||||
@Before
|
||||
@@ -71,6 +70,14 @@ public abstract class AbstractMappingJacksonHttpMessageConverterTests<T extends
|
||||
assertTrue(converter.canWrite(Map.class, new MediaType("application", "json")));
|
||||
}
|
||||
|
||||
// SPR-7905
|
||||
|
||||
@Test
|
||||
public void canReadAndWriteMicroformats() {
|
||||
assertTrue(converter.canRead(MyBean.class, new MediaType("application", "vnd.test-micro-type+json")));
|
||||
assertTrue(converter.canWrite(MyBean.class, new MediaType("application", "vnd.test-micro-type+json")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void readTyped() throws IOException {
|
||||
String body =
|
||||
|
||||
Reference in New Issue
Block a user