请查看本文,该文章描述了如何使用杰克逊objectMapper的功能来完成此任务。
https://github.com/FasterXML/jackson-dataformat-
xml/issues/21
对我来说,添加以下内容可以解决此问题
jsonMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);

请查看本文,该文章描述了如何使用杰克逊objectMapper的功能来完成此任务。
https://github.com/FasterXML/jackson-dataformat-
xml/issues/21
对我来说,添加以下内容可以解决此问题
jsonMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);