SpringMVC (Spring MVC)
Let's first look at the SpringMVC diagram.
Create a project, create a config resource folder, and configure the file
Web. xml:
Index. jsp
SpringMVC
Org. springframework. web. servlet. DispatcherServlet
ContextConfigLocation
C
Absrtact: Original Creation Place: www.bysocket.com Mason bysocket Hope reprint, keep abstract, thank you!
Simple is good, life can be very German
Q: What is Spring MVC? ※
Spring MVC is an important module of the spring Web.
important IOC container beanfactory. Analogy: Xmlbeanfactory,filesystemxmlapplicationcontext and so on.????? -2,spring aop:spring the core modules of AOP.????? -3,spring mvc:spring MVC module.????? -4,spring jdbc/spring ORM:SPRINGJDBC Operation package.????? -5,
The previous article introduced the basic architecture diagram of Spring Cloud cloud service architecture, and we built the code based on the architecture diagram. Based on the concept of micro-service design, combined with
The previous article introduces the basic architecture diagram of Spring Cloud cloud service architecture, this article constructs the code according to the architecture diagram, according to the micro-service design idea, unifies
division of labor is more clear, conducive to later maintenance and upgradeDisadvantages:1, reduce the performance of the system. Without a tiered structure, many businesses can access the database directly to get the data, and now they have to do it through the middle tier.2. Sometimes cascade changes are caused. This kind of modification is especially reflected in the top-down direction. If you need to add a feature in the presentation layer to ensure that the design conforms to the layered s
Tags: blog http io ar using Java SP for strongVarious system architecture diagrams and their introductionReproduced please retain the source, the life of a drunken summary.The following text and architecture diagram are used in my related system design and architecture scheme.Original source: http://space.itpub.net/651
' (
' id ' bigint not null auto_increment,
' name ' varchar (255) NULL,
' age ' int NULL,
PRIMARY KEY (' id ')
);
INSERT into info (name,age) VALUES (' Mick ', ' a ');
INSERT into info (name,age) VALUES (' Mick1 ', ' a ');
INSERT into info (name,age) VALUES (' Mickjoust1 ', ' + ');
INSERT into info (name,age) VALUES (' Joust ', ' 22 ');
Start
View Homepage: http://localhost:8080View database data: Http://localhost:8080/show Summary
This chapter has more space to configure, omit some of th
Spring MVC framework. The bank example shows how to model and build simple applications. The sample application contains some technologies (such as dependency injection) that have been learned, but mainly demonstrates the features of spring MVC.
Before you start, download the source code of this article. For more info
Extjs5.0 from the beginner to the actual development information Management System (ExtJS Foundation, EXTJS5 new features, spring, Spring MVC, Mybatis) video tutorial Download Contact qq:1026270010ExtJS as an excellent JS front-end development framework with its good architecture, rich UI Component library, perfect
Spring MVC Framework
The Spring framework provides a full-featured MVC module for building WEB applications. Using spring's pluggable MVC architecture, you can choose to use a web framework such as the built-in
)) .andExpect(status().isOk()) .andExpect(content().string(equalTo("Hello World"))); } } Use Mockservletcontext to build an empty webapplicationcontext, This allows the hellocontroller that we create to be created in the @before function and passed to the Mockmvcbuilders.standalonesetup () function.Note introduce the following to make the status, content, Equalto functions availableimport static org.hamcrest.Matchers.equalTo; import static org.springfr
Spring MVC, Spring Learning notes
Original link: http://leoluo.top/2017/11/21/Spring/blog:why so seriousGithub:leoluo22CSDN: My CSDN 0x00 preface
Why do I have to learn spring?
It used to be Django, but the company was using spring
Before you begin, download the source code for this article. See Resources Access Spring Framework and Tom
CAT 5.0, running the samples requires them.
Spring MVC Framework
The Spring framework provides a full-featured MVC module for building WEB applications. Using
(equalTo("Hello World"))); }}Use Mockservletcontext to build an empty webapplicationcontext, This allows the hellocontroller that we create to be created in the @before function and passed to the Mockmvcbuilders.standalonesetup () function.Note introduce the following to make the status, content, Equalto functions availableimport static org.hamcrest.Matchers.equalTo;import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;import static org.springframework.test.w
Handleradapter .5. Execution Processor (Controller, also called back-end controller)6. When the processor controller finishes executing, return to Modelandview.7. The processor Mapper Handleradapter Returns the processor controller execution Modelandview back to the front controller Dispatcherservlet.8. Front controller Dispatcherservlet passes Modelandview to the view parser Viewresolver.9. The view resolver Viewresolver parse to return to the specific viewsview.Front Controller Dispatcherserv
method definition, it is like setting up Spring MVC interface, for this method, it corresponds to the URL is/users/getuserdetail/{id}.Then, when it is used, it is injected into the same way as a generic service:123456789 public class Someotherserviceclass {br/> @Autowiredpublic void dosomething () {// .....Userdto results = Userservice.getuserbyid (userId);Other operation ...}}Problems encounteredBecause t
robustness, code reuse, and architecture. Although it will take a certain amount of effort to initially build the MVC framework, it will greatly improve the efficiency of later software development in the long run. Therefore, we should consider the scope of application in the specific application,second, the principle of work 1, the Web Working principle diagram
accept MVC and have the ability to cope with the extra work and complexity it brings, MVC will put your software on a new level in terms of robustness, code reuse, and structure.
Java Web application development involves several development methods that comply with the MVC design pattern.1: JSP + servlet + JavaBean (EJB) 2: JSP + JavaBean (Controller) + JavaBea
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.