I am using spring boot with jackson. I am trying to configure a webhook resource and expecting Event Object as request body. But when I get a webhook call my resource reject that request with 400 because jackson is not able to bind it. What it says is
Can not construct instance of com.stripe.model.StripeObject: abstract types either need to be mapped to concrete types, have custom deserializer, or contain additional type information
at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@626f4396; line: 7, column: 15] (through reference chain: com.stripe.model.Event["data"]->com.stripe.model.EventData["object"])
I searched for its solution and it says to add JsonTypeInfo on StripeObject. I don't want to create a another class in my own project for the same. Is there something which I am missing?
I am using spring boot with jackson. I am trying to configure a webhook resource and expecting Event Object as request body. But when I get a webhook call my resource reject that request with 400 because jackson is not able to bind it. What it says is
I searched for its solution and it says to add JsonTypeInfo on StripeObject. I don't want to create a another class in my own project for the same. Is there something which I am missing?