Replies: 1 comment 3 replies
-
Can you also share reproducible failing example? Since we already have working example in |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm writing a specific service that needs to be deserialized by
ObjectMapper
, and it must store the sameObjectMapper
as its field.I was trying to write a small demo, but it works perfectly:
Output
The problem occurs when I try do the same in a real project.
Project link
The code flow is the following:
PagingMethod<Tracks>
instance. This instance hasDeezerContext
that holdsObjectMapper
.execute()
.Page<Track>
.next
will be converted to newPagingMethod<Tracks>
instance, and it will be holding the sameDeezerContext
. Deserialiazition goes viaio.github.yvasyliev.deezer.json.PagingMethodDeserializerV2
.The code is safe to run locally, no configuration or tokens required. Only Lombok annotation processing must be enabled.
If I try to run
io.github.yvasyliev.deezer.Main#main
, I'll get an exception.Output
As I understand from the logs, mapper for some reason tries to create a JSON representation of
DeezerContext#objectMapper
, althoughMethod#context
is annotated with@JacksonInject
.As per docs, it's an "unusual" behavior.
Could you please suggest a proper way to inject
DeezerContext
?Beta Was this translation helpful? Give feedback.
All reactions