Spring Framework DefaultAnnotationHandlerMapping - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework DefaultAnnotationHandlerMapping class.

This code example shows how to use the following methods:setPathMatcher
public class ParameterizedUrlHandlerMapping extends DefaultAnnotationHandlerMapping { //SimpleUrlHandlerMapping { 
 
    public static final String PATH_PARAMETERS = "ParameterizedUrlHandlerMapping.path-parameters"; 
    private ParameterizedPathMatcher pathMatcher = null; 
 
    public ParameterizedUrlHandlerMapping() { 
        pathMatcher = new ParameterizedPathMatcher(); 
        super.setPathMatcher(pathMatcher); 
    } 
 
    public void setPathMatcher(PathMatcher pathMatcher) { 
        // do not replace parameterized matcher 
    } 
 
    protected Object lookupHandler(String urlPath, HttpServletRequest request) { 
        Object handler = null; 
 
        Map<String, Object> handlerMap = (Map<String, Object>) getHandlerMap(); 
 
        // Pattern match? 
5
CodeRank
This code example shows how to use the following methods:
 * @description: implementation of {@link HandlersRegistry} made by copy-paste from Spring MVC 
 * usage: instantiate this bean in the root context, call registerXxx methods from nested children 
 * contexts to register controllers and request handlers. 
 * don't forget to instantiate HandlerAdapters beans and follow Spring MVC conventions. 
 */ 
public class ContextParentAnnotationHandlerMapping extends DefaultAnnotationHandlerMapping implements HandlersRegistry { 
 
    private final Map<Class<?>, RequestMapping> cachedMappings = new HashMap<Class<?>, RequestMapping>(); 
 
    /** 
     * @see org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping.determineUrlsForHandler(String) 
     */ 
    protected String[] determineUrlsForHandlerByName(String beanName) { 
        List<String> urls = new ArrayList<String>(); 
        if (beanName.startsWith("/")) { 
            urls.add(beanName); 
        } 
        /* does nothing due to lack of 
           * String[] aliases = getApplicationContext().getAliases(beanName); 
          for (int i = 0; i < aliases.length; i++) { 
3
CodeRank