Using Dagger 2 to inject values when deserializing with Jackson -


when deserializing, jackson fetch values of properties of object marked @jacksoninject mapping supplied objectmapper instead of json. mapping specified calling objectmapper.setinjectablevalues() , providing injectablevalues object can values injected on request.

it easy create such object guice (as jackson-module-guice does). first, when create object mapper, inject injector , wrap in injectablevalues implementation forwards requests injector (the class of thing injected , annotations available).

to make work dagger 2, need able take class object (and relevant annotations) , inject instance @ runtime. however, given dagger 2's code-generation approach, not seem possible. missing something?


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -