Java 类com.google.inject.struts2.Struts2GuicePluginModule 实例源码

项目:guice    文件:ExampleListener.java   
public Injector getInjector() {
  return Guice.createInjector(
      new Struts2GuicePluginModule(),
      new ServletModule() {
        @Override
        protected void configureServlets() {
          // Struts 2 setup
          bind(StrutsPrepareAndExecuteFilter.class).in(Singleton.class);
          filter("/*").through(StrutsPrepareAndExecuteFilter.class);

          // Our app-specific code
          bind(Service.class).to(ServiceImpl.class);
        }
      });
}
项目:guice-old    文件:ExampleListener.java   
public Injector getInjector() {
  return Guice.createInjector(
    new Struts2GuicePluginModule(),
    new ServletModule() {
      @Override
      protected void configureServlets() {      
        // Struts 2 setup
        bind(StrutsPrepareAndExecuteFilter.class).in(Singleton.class);
        filter("/*").through(StrutsPrepareAndExecuteFilter.class);

        // Our app-specific code
        bind(Service.class).to(ServiceImpl.class);
    }
  });
}
项目:google-guice    文件:ExampleListener.java   
public Injector getInjector() {
  return Guice.createInjector(
    new Struts2GuicePluginModule(),
    new ServletModule() {
      @Override
      protected void configureServlets() {      
        // Struts 2 setup
        bind(StrutsPrepareAndExecuteFilter.class).in(Singleton.class);
        filter("/*").through(StrutsPrepareAndExecuteFilter.class);

        // Our app-specific code
        bind(Service.class).to(ServiceImpl.class);
    }
  });
}