@Override
    @SuppressWarnings("unchecked")
    protected final void configureShiro() {
        bindBeanType(TypeLiteral.get(ServletContext.class), Key.get(ServletContext.class, Names.named(NAME)));
        bind(Key.get(ServletContext.class, Names.named(NAME))).toInstance(this.servletContext);
        bindWebSecurityManager(bind(WebSecurityManager.class));
        bindWebEnvironment(bind(WebEnvironment.class));
        bind(GuiceShiroFilter.class).asEagerSingleton();
        expose(GuiceShiroFilter.class);

        this.configureShiroWeb();

        // add default matching route if not already set
        if (!filterChains.containsKey("/**")) {
            // no config, this will add only the global filters
            this.addFilterChain("/**", new FilterConfig[0]);
        }

        bind(FilterChainResolver.class).toProvider(new FilterChainResolverProvider(setupFilterChainConfigs()));
    }
We use a LinkedHashMap here to ensure that iterator order is the same as add order.  This is important, as the
FilterChainResolver uses iterator order when searching for a matching chain.
support/guice/src/main/java/org/apache/shiro/guice/web/ShiroWebModule.java