原文:coding++:error Could not read JSON: Unexpected token (START_OBJECT), expected START_ARRAY: need JSON Array to contain As.WRAPPER_ARRAY type information for class java.lang.Object

Spring源码中是使用容器中的ObjectMapper对象进行序列化和反序列化。 当我们将自定义的ObjectMapper对象放入IOC容器中后,会自动覆盖SpringBoot自动装载的ObjectMapper对象。 若是我们在自定义的ObjectMapper中设置了objectMapper.enableDefaultTyping ObjectMapper.DefaultTyping.NON ...

2020-03-31 17:41 0 5524 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM