com.google.inject.servlet.RequestScoped#org.apache.shiro.guice.web.ShiroWebModule源码实例Demo

下面列出了com.google.inject.servlet.RequestScoped#org.apache.shiro.guice.web.ShiroWebModule 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: usergrid   文件: ChopUiModule.java
protected void configureServlets() {
    install( new GuicyFigModule( ChopUiFig.class, Project.class, RestFig.class, ElasticSearchFig.class ) );
    install( new AmazonModule() );

    // Hook Jersey into Guice Servlet
    bind( GuiceContainer.class );

    bind( IElasticSearchClient.class ).to( ElasticSearchClient.class );

    // Hook Jackson into Jersey as the POJO <-> JSON mapper
    bind( JacksonJsonProvider.class ).asEagerSingleton();

    bind( UploadResource.class ).asEagerSingleton();
    bind( RunManagerResource.class ).asEagerSingleton();
    bind( TestGetResource.class ).asEagerSingleton();
    bind( AuthResource.class ).asEagerSingleton();
    bind( PropertiesResource.class ).asEagerSingleton();
    bind( RunnerCoordinator.class ).asEagerSingleton();

    ShiroWebModule.bindGuiceFilter( binder() );

    // This should be before "/*" otherwise the vaadin servlet will not work
    serve( "/VAADIN*" ).with( VaadinServlet.class );

    Map<String, String> params = new HashMap<String, String>();
    params.put( PACKAGES_KEY, getClass().getPackage().toString() );
    serve( "/*" ).with( GuiceContainer.class, params );
}
 
源代码2 项目: opensoc-streaming   文件: DefaultServletModule.java
@Override
  protected void configureServlets() {
      
ShiroWebModule.bindGuiceFilter(binder());

bind( KafkaWebSocketCreator.class ).in(Singleton.class);

      bind( HttpServletDispatcher.class ).in(Singleton.class);
      serve( "/rest/*").with(HttpServletDispatcher.class);
      
      bind( KafkaMessageSenderServlet.class ).in(Singleton.class);
serve( "/ws/*").with(KafkaMessageSenderServlet.class );

bind( LoginServlet.class).in(Singleton.class);
serve( "/login" ).with( LoginServlet.class );
      
bind( LogoutServlet.class).in(Singleton.class);
serve( "/logout" ).with( LogoutServlet.class );

  }