spring-cloud / spring-cloud-function

Apache License 2.0
1.04k stars 617 forks source link

4.1.3 - customized objectMapper #1165

Closed AlonPorter closed 2 months ago

AlonPorter commented 3 months ago

Describe the bug After upgrading to 4.1.3 we got errors in our app regarding failing to parse some json. after invetigation we understad that we want to customize the object mapper to have FAIL_ON_TRAILING_TOKEN false, but can't override this value. Hope I explain good. thanks in advance.

GreenRover commented 2 months ago

I confirm since the lates release it is not linger possible to to modify the ObjectMapper.

I would like to propose to use the object mapper created/used by spring boot instead of creating an dedicated one that can not be modified.

My actual business problem ist:

As ugly workaround i now de/serialize everything outside of spring cloud stream, what means dont be able to use a key feature of spring cloud function.

In my opinion such changes are a no go for a minion release. @olegz Was an intended change or can we consider this as a bug?

Or did some one find a way to overwrite: ContextFunctionCatalogInitializer.ContextFunctionCatalogBeanRegistrar::postProcessBeanDefinitionRegistry

olegz commented 2 months ago

I believe this has been addressed - https://github.com/spring-cloud/spring-cloud-function/issues/1148 You can go back to configuring ObjectMapper the standard way. Please file a new issue if the problem persists