読者です 読者をやめる 読者になる 読者になる

Google DI Container

Guice

Guiceとは,

Guice (pronounced 'juice') is a lightweight dependency injection framework for Java 5, brought to you by Google

http://code.google.com/p/google-guice/

ソースを見てたらSpringIntegrationTest.javaの一部

    Injector injector = Guice.createInjector(new AbstractModule() {
      protected void configure() {
        SpringIntegration.bindAll(binder(), beanFactory);
      }
    });

    Key<Singleton> singletonKey
        = Key.get(Singleton.class, Names.named("singleton"));
    Key<Prototype> prototypeKey
        = Key.get(Prototype.class, Names.named("prototype"));

    assertNotNull(injector.getInstance(singletonKey));
    assertSame(injector.getInstance(singletonKey),
        injector.getInstance(singletonKey));

springとstruts2関連がありました.

あまり,グイグイ引き込まれなかったです.