Examples of UrlMapping


Examples of org.nutz.mvc.UrlMapping

      log.debugf(" - Timezone        : %s", System.getProperties().get("user.timezone"));
    }
    /*
     * 准备返回值
     */
    UrlMapping mapping;

    /*
     * 准备计时
     */
    Stopwatch sw = Stopwatch.begin();
View Full Code Here

Examples of org.nutz.mvc.UrlMapping

    /*
     * @ TODO 个人建议可以将这个方法所涉及的内容转换到Loadings类或相应的组装类中,
     * 以便将本类加以隔离,使本的职责仅限于MVC整体的初使化,而不再负责UrlMapping的加载
     */
   
    UrlMapping mapping;
    /*
     * 准备 UrlMapping
     */
    mapping = createUrlMapping(config);
    if (log.isInfoEnabled())
      log.infof("Build URL mapping by %s ...", mapping.getClass().getName());

    /*
     * 创建视图工厂
     */
    ViewMaker[] makers = createViewMakers(mainModule);

    /*
     * 创建动作链工厂
     */
    ActionChainMaker maker = createChainMaker(config, mainModule);

    /*
     * 创建主模块的配置信息
     */
    ActionInfo mainInfo = Loadings.createInfo(mainModule);

    /*
     * 准备要加载的模块列表
     */
    //TODO 为什么用Set呢? 用List不是更快吗?
    Set<Class<?>> modules = Loadings.scanModules(mainModule);

    /*
     * 分析所有的子模块
     */
    for (Class<?> module : modules) {
      ActionInfo moduleInfo = Loadings.createInfo(module).mergeWith(mainInfo);
      for (Method method : module.getMethods()) {
        /*
         * public 并且声明了 @At 的函数,才是入口函数
         */
        if (!Modifier.isPublic(method.getModifiers())
          || !method.isAnnotationPresent(At.class))
          continue;
        // 增加到映射中
        ActionInfo info = Loadings.createInfo(method).mergeWith(moduleInfo);
        info.setViewMakers(makers);
        mapping.add(maker, info, config);
      }
     
      //记录pathMap
      if(null != moduleInfo.getPathMap()){
        for(Entry<String, String> en : moduleInfo.getPathMap().entrySet()){
View Full Code Here

Examples of org.springframework.security.config.annotation.web.configurers.AbstractConfigAttributeRequestMatcherRegistry.UrlMapping

            throw new IllegalStateException("permitAll only works with HttpSecurity.authorizeRequests()");
        }

        for(RequestMatcher matcher : requestMatchers) {
            if(matcher != null) {
                configurer.getRegistry().addMapping(0, new UrlMapping(matcher, SecurityConfig.createList(ExpressionUrlAuthorizationConfigurer.permitAll)));
            }
        }
    }
View Full Code Here

Examples of org.springframework.security.config.annotation.web.configurers.AbstractRequestMatcherMappingConfigurer.UrlMapping

            throw new IllegalStateException("permitAll only works with HttpSecurity.authorizeUrls()");
        }

        for(String url : urls) {
            if(url != null) {
                configurer.addMapping(0, new UrlMapping(new ExactUrlRequestMatcher(url), SecurityConfig.createList(ExpressionUrlAuthorizationConfigurer.permitAll)));
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.