The factory method here relies on an unqualified bean of type ObjectMapper. This causes an initialization error if multiple ObjectMapper beans are present and none are marked @Primary.
While this behavior is fine as a default, it needs to be customizable to avoid conflicts with other APIs. Many libraries use ObjectMappers, but there can only be one @Primary bean, which means interfaces like this one may not be independently configurable. A more extensible approach might be to allow the user to configure the object mapper manually and fall back to the primary bean in the application context only if none is set.