Support for new JsonMappingException wording in Jackson 2.9

Issue: SPR-16947
This commit is contained in:
Juergen Hoeller
2018-06-28 16:42:35 +02:00
parent a631af80c1
commit 6d0f8bf145
2 changed files with 6 additions and 3 deletions

View File

@@ -181,8 +181,9 @@ public class MappingJackson2MessageConverter extends AbstractMessageConverter {
return;
}
// Do not log warning for serializer not found (note: different message wording on Jackson 2.9)
boolean debugLevel = (cause instanceof JsonMappingException &&
cause.getMessage().startsWith("Can not find"));
(cause.getMessage().startsWith("Can not find") || cause.getMessage().startsWith("Cannot find")));
if (debugLevel ? logger.isDebugEnabled() : logger.isWarnEnabled()) {
String msg = "Failed to evaluate Jackson " + (type instanceof JavaType ? "de" : "") +