Springmvc
The core idea of web development:
- The model is separated from the view;
- The control logic is separated from the business logic;
- The view selection is separated from the specific view technology;
- Non-intrusive development (with minimal use of framework-specific APIs) and easy testing.
What is SPRINGMVC:
- SPRINGMVC is a Web component of the spring framework, which is a lightweight web framework based on Java-implemented web MVC.
- Using the idea of MVC architecture pattern, the Web layer is decoupled from responsibility, and the request-response model is used to simplify the development;
- Is the most mainstream MVC framework in the presentation layer.
Working with model data:
- Modelandview: The method body can add model data through this object;
- @ModelAttribute: Annotate the parameter with this annotation, which is placed in the data model;
- Map and Model: When the entry is model, MODELMAP, or map, the data in the map is automatically added to the model when the processing method returns;
- @SessionAttribute: A property in the model is staged in httpsession so that the property can be shared between multiple requests;
Interception device
Springmvc interceptors are similar to filter filters in servlet development and are used for preprocessing and post-processing of processor controllers;
The common application scenarios for interceptors are as follows: logging, permission checking, performance monitoring, general behavior.
Java EE springmvc Basic concepts (please leave a message if you need more information)