Hi coders,
I have just implemented a Login action, which populates a singleton instance of LoginInfo using Gin, like this:
// pass LoginInfo instance to the singleton held by Gin, which calls initialize() to fill the fields.
ginjector.getLoginInfo().initialize(result.getLoginInfo());
Now I have done that, I need to make a call to the server, and I need to access my LoginInfo singleton instance on the server side.
So I am wondering if I can somehow copy the same singleton from gin to guice, so that I can use @Inject on the constructor of my ActionHandler?
I understand that Gin is only on client-side and guice is on server-side. I tried using @Inject on the server but it seems to just be injecting a fresh instance.
Thanks,
Drew