-
Notifications
You must be signed in to change notification settings - Fork 610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom ObjectMapper is not used #1159
Comments
We also stumbled over that issue. 😞 @Bean
@Primary
public JacksonMapper jacksonMapper(final ObjectMapper objectMapper) {
return new JacksonMapper(objectMapper);
} |
If I understood the issue correctly, the reason for 8b66fd2 was that you need to configure some things on the ObjectMapper and don't want this to affect the original one from the context. Wouldn't it make sense then to just I will submit a PR. This should restore the behavior from before the GH-1148 change without any additional configuration required. I still think #1160 is a valuable change as it would allow you to further configure the ObjectMapper to be used. |
Same here. 4.12: our modules and jackson settings are used
4.13: our modules and jackson settings are no long used
|
We suffer from the same issue as well. As a workaround, we are overriding the behavior of the
|
Describe the bug
With the latest spring-cloud-function 4.1.3 release a custom
ObjectMapper
bean is no longer respected when creating theFunctionCatalog
in the ContextFunctionCatalogAutoConfiguration.java.We need this behaviour, because must configure the
ObjectMapper
to use the snake-case naming strategy.This regression is introduced by commit 8b66fd2 which fixed issue #1148.
Sample
If you really want an example I can provide some.
Possible Solution
I would like to propose the following solution to fix this issue. Adding a
@ConditionalOnMissingBean
on the bean definition of theJsonMapper
here. With this change one can easily provide a customJsonMapper
Bean wrapping a customObjectMapper
. This could also fix issue #1059.The text was updated successfully, but these errors were encountered: