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);