@@ -31,7 +31,7 @@ public abstract class WebApplication {
3131 private Logger logger = Logger .getLogger ("WebApp" );
3232 private final SQL sql ;
3333 private final HTTPServer server ;
34- private final SimpleInjector injector ;
34+ private final Injector injector ;
3535 private final Faker faker = new Faker ();
3636 private final Config config = new Config ();
3737 private final Crypt crypt ;
@@ -44,10 +44,9 @@ public abstract class WebApplication {
4444 public WebApplication (){
4545 injector = new SimpleInjector ();
4646 injector .setInstance (Injector .class , injector );
47- injector .setInstance (SimpleInjector .class , injector );
4847 injector .setInstance (Faker .class , faker );
4948 injector .setInstance (Config .class , config );
50- injector .setInstanceUnsafe ( getClass (), this );
49+ injector .setInstance (( Class < WebApplication >) getClass (), this );
5150 injector .setInstance (WebApplication .class , this );
5251 injector .setInstance (CommandSystem .class , commandSystem );
5352 injector .setInstance (I18N .class , translation );
@@ -192,7 +191,7 @@ public HTTPServer getServer() {
192191 return server ;
193192 }
194193
195- public SimpleInjector getInjector () {
194+ public Injector getInjector () {
196195 return injector ;
197196 }
198197
@@ -214,7 +213,7 @@ public I18N getTranslation(){
214213
215214 protected void setupModules (){}
216215 protected abstract void setupConfig (Config config );
217- protected void setupInjection (SimpleInjector injector ){}
216+ protected void setupInjection (Injector injector ){}
218217 protected void setupSeeding (){}
219218 protected abstract void setupModels (SQL sql ) throws ORMConfigurationException ;
220219 protected abstract void setupServer (HTTPServer server );
0 commit comments