问题描述:

My Java desktop application uses Google Guice for dependency injection. So far everything is good, however the app takes a long time to start up. I put in some timing logs into the code and found the line that is taking a long time:

this.applicationRunner = injector.getInstance(ApplicationRunner.class);

On average this takes around 45 seconds to complete.

My app uses javax.inject in combination Guice and it's standard features (Providers, Named parameters, etc.)

How could I find out why this is taking so long?

相关阅读:
Top