原文: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