Package org.springframework.web.bind.annotation.support

Examples of org.springframework.web.bind.annotation.support.HandlerMethodResolver


  protected void resolveHandlerMethodPermission(HttpServletRequest request, Object handler) {
    WidgetConfig widgetConfig = (WidgetConfig) request.getAttribute(WidgetConfig.KEY) ;
    if(widgetConfig!=null) {
      String requestPath = widgetConfig.getPath();
      if(!permissionMappings.containsKey(requestPath)) {
        HandlerMethodResolver handlerMethodResolver = new HandlerMethodResolver();
        handlerMethodResolver.init(handler.getClass());
        RequestMapping classRequestMapping = AnnotationUtils.findAnnotation(handler.getClass(), RequestMapping.class);
        String[] namespaces = classRequestMapping.value();
        Iterator<Method> iter = handlerMethodResolver.getHandlerMethods().iterator();
        while(iter.hasNext()) {
          Method method = iter.next();
          RequestMapping methodRequestMapping = AnnotationUtils.findAnnotation(method, RequestMapping.class);
          String[] paths = methodRequestMapping.value();
          List<String> mappingPaths = buildMappingPaths(namespaces, paths);
View Full Code Here


    for (String key : urls) {

      Object handler = handlerMap.get(key);
      Class<?> handlerType = ClassUtils.getUserClass(handler);
      HandlerMethodResolver resolver = new HandlerMethodResolver();
      resolver.init(handlerType);

      String[] typeMappings = null;
      RequestMapping typeMapping = AnnotationUtils.findAnnotation(handlerType, RequestMapping.class);
      if (typeMapping != null) {
        typeMappings = typeMapping.value();
      }

      Set<Method> handlerMethods = resolver.getHandlerMethods();
      for (Method method : handlerMethods) {

        RequestMapping mapping = method.getAnnotation(RequestMapping.class);

        Collection<String> computedMappings = new HashSet<String>();
View Full Code Here

TOP

Related Classes of org.springframework.web.bind.annotation.support.HandlerMethodResolver

Copyright © 2018 www.massapicom. 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.