如何配置 RESTEasy 以使用 Jackson afterburner 模块

How to configure RESTEasy to use the Jackson afterburner module

对于较大的有效负载,我们发现当 JSON 转换为 POJO 时,需要花费大量时间。它在内部使用 Jackson。想知道是否有一种方法可以配置 RESTEasy 以使用 Afterburner 模块,这似乎可以提高性能。

您可以配置要使用的ObjectMapper。一种方法是通过 ContextResolver,参见 . Then just register the module with the ObjectMapper (as seen in the documentation)。