Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save qzagarese/8ecfa2546878893b4f6970d9f95a3cdc to your computer and use it in GitHub Desktop.
Save qzagarese/8ecfa2546878893b4f6970d9f95a3cdc to your computer and use it in GitHub Desktop.
public class GetMappingHandler implements AnnotationHandler<GetMapping> {
@Override
public void handle(ScanContext scanContext, FrameworkAnnotationContext<GetMapping> annotationContext) {
String endpoint = annotationContext.getAnnotation().value();
Method m = (Method) annotationContext.getAnnotatedElement();
Object o = annotationContext.getInstance();
scanContext.createMapping(endpoint, m, o);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment