private void findResources() { Map<String, Object> handlerMap = new HashMap<String, Object>(); DefaultAnnotationHandlerMapping annotationMapping = new DefaultAnnotationHandlerMapping(); annotationMapping.setApplicationContext(applicationContext); annotationMapping.initApplicationContext(); handlerMap.putAll(annotationMapping.getHandlerMap()); BeanNameUrlHandlerMapping beanMapping = new BeanNameUrlHandlerMapping(); beanMapping.setApplicationContext(applicationContext); beanMapping.initApplicationContext(); handlerMap.putAll(beanMapping.getHandlerMap()); this.urls = findUniqueUrls(handlerMap.keySet()); this.defaultResources = findMethods(handlerMap, this.urls); this.jsonResources = new ArrayList<ResourceInfo>(); for (Iterator<ResourceInfo> iterator = this.defaultResources.iterator(); iterator.hasNext(); ) { ResourceInfo info = (ResourceInfo) iterator.next(); if (info.getUrl().endsWith(".json")) { iterator.remove(); this.jsonResources.add(info); } } }