@requestmapping
@RequestMapping is a Spring annotation that associates HTTP request patterns and conditions with controller classes or handler methods.
Spring Start Here, Second Edition
Request mapping is the association between an HTTP request pattern and the controller handler that processes it.
- How it is used
- Assigns a controller action to a specific HTTP request so the app can respond to a path such as /home.
- How deep it goes
- Defines path-based mapping with a returned view name, while deferring request parameters and alternative annotations.
- Examples
- Uses a /home mapping that returns home.html for a browser request.
- What you can do after
- Build a minimal Spring MVC route by mapping a controller method to a path.
Read how Spring Start Here, Second Edition explains @requestmapping →
Spring Microservices in Action
A Spring annotation that maps web requests to a controller class or handler method.
- How it is used
- Maps controller classes and handler methods to HTTP endpoints in a Spring Boot microservice.
- How deep it goes
- Explains class-level URL roots and method-level mappings using path placeholders and an HTTP method.
- Examples
- Uses a licensing controller with organization and license identifiers in a GET endpoint.
- What you can do after
- Apply it with Spring Boot to expose a parameterized controller endpoint.
Read how Spring Microservices in Action explains @requestmapping →
Spring in Action, Sixth Edition
A request-mapping annotation is a Spring web annotation that associates an HTTP request pattern with a handler method or controller.
- How it is used
- Routes Spring MVC requests to controller classes and handler methods, often combining a shared path with an HTTP-method mapping.
- How deep it goes
- Defines class-level and general-purpose request mapping, then relies on specialized annotations for HTTP methods.
- Examples
- Uses DesignTacoController mapped to /design and refined by a GET handler for the taco design form.
- What you can do after
- Apply it via Spring MVC to connect request paths and HTTP methods with controller behavior.
Read how Spring in Action, Sixth Edition explains @requestmapping →
Also covered in
Related concepts
- endpointconfigures · An endpoint is an addressable interface of a service through which clients access a resource or invoke an operation, typically via a network request.
- controllerconfigures · A controller is a software component that receives input or requests and coordinates other components or operations to produce a response or change application state.
- Spring MVCused by · Spring MVC is Spring’s web framework for handling HTTP requests and responses using the Model-View-Controller pattern.
- web API action methodconfigures · A web API action method is a controller method associated with a matched HTTP request that processes it and produces a response.
- @getmappingconfigures · @GetMapping is a Spring MVC annotation that maps HTTP GET requests for a specified path to a controller method.
- @postmappingconfigured by · @PostMapping is a Spring MVC annotation that maps HTTP POST requests to a controller method.
Questions about @requestmapping
What is @requestmapping?
@RequestMapping is a Spring annotation that associates HTTP request patterns and conditions with controller classes or handler methods.
Which Manning books explain @requestmapping?
Spring Start Here, Second Edition, Spring Microservices in Action and Spring in Action, Sixth Edition.
What should I know before learning @requestmapping?
Manning books that teach @requestmapping usually introduce Java first.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


