Java EE springmvc Basic concepts (please leave a message if you need more information)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.