SPRINGMVC Study Guide

Source: Internet
Author: User

Today finally put SPRINGMVC study guide This book finished, write down this blog record.

Paired with SPRINGMVC environment

Step one: Add Dispatcherservlet to the Web. xml file, which I understand is to dispatch the action allocator with @controller annotations

Step Two: Initialize the springmvc.xml path

Step three: Map all URLs to the servlet by configuring the Url-pattern element

Fourth Step: Configure the path of the JSP file, with the suffix

The fifth step of the:<annotation-driven> element includes registering the Bean object that is used to support the request processing method of the annotation-based controller. The <resource> element indicates SPRINGMVC which static resources need to be handled separately (not through Dispatcherservler)

It should be noted that if there is no <annotation-driven>,,<resource> will prevent any controller from being called.

Sixth step: Spring uses the scanning mechanism to find all the annotation-based controller classes in the application.

================================================================================

@Autowired for annotation service in the Controller class, @Service implementation class for the annotation service

SPRINGMVC Study Guide

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.