Use Jackson improved default configuration everywhere
With this commit, Jackson builder is now used in spring-websocket to create the ObjectMapper instance. It is not possible to use the builder for spring-messaging and spring-jms since these modules don't have a dependency on spring-web, thus they now just customize the same features: - MapperFeature#DEFAULT_VIEW_INCLUSION is disabled - DeserializationFeature#FAIL_ON_UNKNOWN_PROPERTIES is disabled Issue: SPR-12293
This commit is contained in:
@@ -87,11 +87,12 @@ public class MappingJackson2MessageConverterTests {
|
||||
this.converter.fromMessage(message, MyBean.class);
|
||||
}
|
||||
|
||||
@Test(expected = MessageConversionException.class)
|
||||
@Test
|
||||
public void fromMessageValidJsonWithUnknownProperty() throws IOException {
|
||||
String payload = "{\"string\":\"string\",\"unknownProperty\":\"value\"}";
|
||||
Message<?> message = MessageBuilder.withPayload(payload.getBytes(UTF_8)).build();
|
||||
this.converter.fromMessage(message, MyBean.class);
|
||||
MyBean myBean = (MyBean)this.converter.fromMessage(message, MyBean.class);
|
||||
assertEquals("string", myBean.getString());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user