-
Notifications
You must be signed in to change notification settings - Fork 231
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
Provide a mechanism for retrieving non-wrapped ObjectMapper instance #352
Comments
Hi @ash-sykes-acn, is there a particular reason why you want to access that instance of ObjectMapper? Thanks Mark |
@msailes Yes, when using Spring Cloud, the function handler that attempts to deserialise the incoming AWS event (in this instance a ScheduledEvent) fails as the input has an unexpected @Bean
@Primary
public ObjectMapper objectMapper() {
return JacksonFactory.getInstance().getMapper();
} Which would work if the Mapper returned was of type If I use the above and change other ObjectMapper imports to
I can lift and shift your mapper config into a bean that is of type Hopefully I managed to explain the reason for wanting this sufficiently :D |
@olegz is there anything else that can be done in this case? |
Hi, attempting to use Spring Cloud for an AWS lambda. Spring cloud looks for an instance of
com.fasterxml.jackson.databind.ObjectMapper
. However, the serialisation library only provides a mechanism (as far as I can see) to return a wrapped instance of the configured mapper (i.e.com.amazonaws.thirdparty...
).Is there a way to get the expected ObjectMapper instance that I've missed? Or an appetite to expose the appropriately typed instance?
The text was updated successfully, but these errors were encountered: