@Test public void shouldHandleComplexCase() { @RequestMapping(path="/orders") class MyController2 { @RequestMapping(method= RequestMethod.GET) public void getOrders() { } } extractor.buildFromControllerClass(builder, MyController2.class); verify(builder).addSynchronousQueryEndpoint("getOrders", "GET", "/orders"); }
void buildFromControllerClass(ServiceModelBuilder builder, Class<?> controllerClass) { ReflectionUtils.doWithMethods(controllerClass, method -> { buildFromControllerMethod(builder, controllerClass, method); }, method -> AnnotationUtils.findAnnotation(method, RequestMapping.class) != null); }
ControllerExtractor extends AbstractSpringContextModelExtractor { void buildFromControllerClass(ServiceModelBuilder builder, Class<?> controllerClass) { ReflectionUtils.doWithMethods(controllerClass, method -> { buildFromControllerMethod(builder, controllerClass, method); }, method -> AnnotationUtils.findAnnotation(method, RequestMapping.class) != null); } }
ControllerExtractor extends AbstractSpringContextModelExtractor { void buildFromControllerClass(ServiceModelBuilder builder, Class<?> controllerClass) { ReflectionUtils.doWithMethods(controllerClass, method -> { buildFromControllerMethod(builder, controllerClass, method); }, method -> AnnotationUtils.findAnnotation(method, RequestMapping.class) != null); }  }
ControllerExtractor extends AbstractSpringContextModelExtractor { void buildFromControllerClass(ServiceModelBuilder builder, Class<?> controllerClass) { ReflectionUtils.doWithMethods(controllerClass, method -> { buildFromControllerMethod(builder, controllerClass, method); }, method -> AnnotationUtils.findAnnotation(method, RequestMapping.class) != null); }  @Override void extract(ServiceModelBuilder builder); }
ControllerExtractor extends AbstractSpringContextModelExtractor { void buildFromControllerClass(ServiceModelBuilder builder, Class<?> controllerClass) { ReflectionUtils.doWithMethods(controllerClass, method -> { buildFromControllerMethod(builder, controllerClass, method); }, method -> AnnotationUtils.findAnnotation(method, RequestMapping.class) != null); }  @Override void extract(ServiceModelBuilder builder);  }