@RequestMapping: Request Mapping
SPRINGMVC No. 01 Day:
Defining controllers with @controller
Spring MVC distributes requests for specific URLs to the controller class for processing
In Spring 3.0, class is defined as a controller class by @controller annotations. In order for spring to find a bean defined as a controller, you need to add the following definition in the Spring-context configuration file: Scanner
1 < base-package= "Net.zhepu.web"/>
1: What is @requestmapping?
Requestmapping: Request Mapping
Used to make modifiers, written before classes or methods, to modify methods and classes.
Function: Maps a request to a method, which is the binding of a foreground request to a target method. This method is the business logic that handles the current request.
notation: 1. Write before the method;
2. Write before the class;
2: Examples of@RequestMapping use:
3:@RequestMapping parameters in detail:
SPRINGMVC Learning Journey-First day: @RequestMapping