1、 SpringMVC Through a set MVC annotation , Give Way POJO Become a controller for processing requests , Without implementing any interfaces .

2、 Support REST Style URL request .

3、 Adopt loose coupling pluggable component structure , More than any other MVC The framework is more extensible and flexible .

4、  To configure web.xml file

4.1 To configure DispatcherServlet: The default load /WEB-INF/<servletName-servlet>.xml Of Spring The configuration file , start-up WEB Layer of Spring Containers . Can pass contextConfigLocation Initialization parameters customize the location and name of the configuration file .

<!-- Spring MVC Related configuration file path  -->


4.2   Configure auto scanned packages

<!--  Scan business components , Give Way spring No scanning with @Service Annotated classes ( Remain root-context.xml Medium scan @Service Annotated classes ), Prevent transaction failures  -->
<context:component-scan base-package="com.hsmdata.qualityinspect">
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller" /> 
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Service" />
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Repository"/>

4.3  Configure the view parser

<!--  Path analysis of turning page .prefix: Prefix , suffix: suffix  -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/"></property>
<property name="suffix" value=".jsp"></property>

SpringMVC More related articles on the framework

  1. 【 Reprint 】SpringMVC The framework is introduced

    from :http://com-xpp.iteye.com/blog/1604183 SpringMVC Frame diagram   SpringMVC Interface explanation   DispatcherServlet Interface : Spring carry ...

  2. SpringMVC Framework introduction and environment construction

    Catalog Introduction to front end design pattern Analyze the front end design pattern Spring MVC Brief introduction Spring and Spring MVC The relationship between To configure Spring MVC And simple testing Introduction to front end design pattern Front end design pattern is nothing like front end design pattern ...

  3. springMVC Framework introduction and operation process ( The illustration )

    1 Springmvc What is it? ? spring web mvc and struts2 All belong to the framework of the presentation layer ,spring web mvc yes spring Part of the frame ( therefore spring mvc And spring There's no need for ...

  4. SpringMVC Learning notes :SpringMVC The implementation process of the framework

    One .MVC Design patterns Two .SpringMVC The framework is introduced 3、 ... and .SpringMVC Environment building Four .SpringMVC The request processing flow and architecture of the framework

  5. Spring Framework introduction and principle

    SpringMVC The framework is introduced 1) Spring MVC Belong to SpringFrameWork Subsequent products of , Already integrated in Spring Web Flow Inside . Spring The framework provides the building Web The full power of the application ...

  6. SpringMVC from the shallower to the deeper day01_1springmvc The framework is introduced

    springmvc The first day springmvc Basic knowledge of course arrangement : The first day :springmvc Basic knowledge of What is? springmvc? springmvc Frame principle ( master ) Front controller . Processor mapper . It's about ...

  7. Scaffolding is built quickly springMVC Framework projects

    apid-framework Scaffolding is built quickly springMVC Framework projects   rapid-framework Introduce :   A similar ruby on rails Of java web Rapid development of scaffolding , In the spirit of non repetition ...

  8. Idea Simple SpringMVC Frame configuration

    I've already introduced Struts stay Idea Configuration on , be relative to Struts Come on , I think SpringMVC There are more advantages , First Struts It needs to be right action To configure , Pages send different requests , You need to configure different acti ...

  9. 3.3.1 MyBatis The framework is introduced

    MyBatis The framework is introduced 1. What is a framework (1) Framework is the lazy programmer to encapsulate the code , And then the process of reuse . (2) The frame is actually a semi-finished product , Take connecting to a database , The driver used to connect to the database , url, use ...

Random recommendation

  1. C++ The road to success is advanced ——codevs1319( The toy box )

    1319 The toy box   The time limit : 1 s   Space restriction : 128000 KB   Question level : diamond Diamond     Title Description  Description P The professor is going to the Olympics , But he could not part with his toys , therefore ...

  2. Python( file 、 Folder compression processing module ,shelve Persistence modules ,xml Processing module 、ConfigParser Document configuration module 、hashlib Encryption module ,subprocess System interaction module log modular )

    OS modular Provides an interface to call the operating system os.getcwd() Get the current working directory , At present python Directory path for script work os.chdir("dirname")  Change the purpose of the current script ...

  3. Portal level UGC The technological evolution of the system —— Architecture evolution and experience summary of Sina News Comment System ( turn )

    add by zhj: First collect Abstract : Comment system is one of the core standard service components of all portals . The author has been in charge of the Sina comment system for many years , This system not only serves portal news business , It also includes the investigation . Voting and other products , From single machine to multi machine to cluster ...

  4. Java Medium BASE64

    located in rt.jar... public class sun.misc.BASE64Encoder extends sun.misc.CharacterEncoder{ //.. } p ...

  5. BZOJ 3569 DZY Loves Chinese II

    Description Seminary XJ It's a bully ,Dzy Huang Kao said JC. Take a picture of TiZhen in mengzou , But Gengyin Dzy To lower . Numerous Dzy It's beautiful inside , To cultivate energy . So it came to OI world , I want to use my divine power * Insult all living beings . today Dzy There is a picture , Above all ...

  6. BZOJ2425: [HAOI2010] Count

    subject :http://www.lydsy.com/JudgeOnline/problem.php?id=2425 In fact, the number that can be formed is the arrangement of the original number ( It's leading 0), And then you can count them together . #include ...

  7. RESTful API Best practices ---- Reprint Ruan Yifeng

    Article address http://www.ruanyifeng.com/blog/2018/10/restful-api-best-practices.html

  8. Project practice 1—LNMP Build 、nginx Of ssl encryption 、 The implementation of Authentication

    General project flow chart , See http://www.cnblogs.com/along21/p/8000812.html Practice one : build lnmp And the realization of commercial websites like Xiaomi Environmental Science : Turn off firewall ,selinux 1. install ...

  9. python------Socket Network programming ( Two ) Stick package problem

    One .socket Network programming Sticky package : The server sends instructions together twice , It's going to send the two transmissions together , It's called sticking bag , So there's a mistake . resolvent :( Compare low Methods ) Some need to be updated in real time , use sleep There is a delay , It can't be solved like this ...

  10. Linux Kernel debugging - I don't usually tell him ( One )【 turn 】

    from :http://www.cnblogs.com/armlinux/archive/2011/04/14/2396821.html Sneak into Linux Kernel debugging ( One ) The base of this article :http://blo ...