Here is a broad overview
- You identify the classes for Spring to search (for annotations).
- Spring finds your @Controller and @RequestMapping annotations.
- Spring builds a map of the URL values from the @RequestMapping annotations.
- At runtime, when a request is received by Spring, it searches the map for the URL. When it finds the URL, it calls the method that is marked with the @RequestMapping.
Summary:
- Annotations don't do anything. They are markers for other classes that do stuff.
Start by reading an Annotation Tutorial. You will need to scan your classes (during startup) for your annotations (using reflection) then handle them appropriately.