What is the Google App Engine equivalent of Android's 'Application' class? for dependency injection -
android lets extend application
, great place store our singletons can reused throughout different pages (actiivities) in app.
what google app-engine's equivalent of this?
i using dagger, , don't want create new object graph every endpoint.
one option (although i'm no means sure it's best) self-inject cloud endpoints class (through static field injection).
presumably you're initialising object graph in servletcontextlistener there, before endpoint methods called.
dagger 1.x supports staticinjections on module annotation (to you) apparently no longer supported in 2.x.
Comments
Post a Comment