You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have to deal with multiple named ObjectMappers in our Application.
Using @EnableHypermediaSupport(type = EnableHypermediaSupport.HypermediaType.HAL) leads to the following Exception:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hypermediaWebFluxConfigurer' defined in class path resource [org/springframework/hateoas/config/WebFluxHateoasConfiguration.class]: Failed to instantiate [org.springframework.hateoas.config.WebFluxHateoasConfiguration$HypermediaWebFluxConfigurer]: Factory method 'hypermediaWebFluxConfigurer' threw exception with message: No qualifying bean of type 'com.fasterxml.jackson.databind.ObjectMapper' available: expected single matching bean but found 2: customizedObjectMapperAAA,customizedObjectMapperBBB
I did not find a possibility to hook into the configuration to use a specific ObjectMapper. The only way to workaround this problem is to use the @Primary annotation to select the preferred ObjectMapper bean.
Is there a way to configure the ObjectMapper? If not it would be nice to have such a possibility to do so.
The text was updated successfully, but these errors were encountered:
We have to deal with multiple named ObjectMappers in our Application.
Using
@EnableHypermediaSupport(type = EnableHypermediaSupport.HypermediaType.HAL)
leads to the following Exception:Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hypermediaWebFluxConfigurer' defined in class path resource [org/springframework/hateoas/config/WebFluxHateoasConfiguration.class]: Failed to instantiate [org.springframework.hateoas.config.WebFluxHateoasConfiguration$HypermediaWebFluxConfigurer]: Factory method 'hypermediaWebFluxConfigurer' threw exception with message: No qualifying bean of type 'com.fasterxml.jackson.databind.ObjectMapper' available: expected single matching bean but found 2: customizedObjectMapperAAA,customizedObjectMapperBBB
I did not find a possibility to hook into the configuration to use a specific ObjectMapper. The only way to workaround this problem is to use the
@Primary
annotation to select the preferred ObjectMapper bean.Is there a way to configure the ObjectMapper? If not it would be nice to have such a possibility to do so.
The text was updated successfully, but these errors were encountered: