) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/8C/CF/wKiom1h4mcWxh7SpAACc0dLT8Us684.png "style=" float : none; "title=" 1.png "alt=" Wkiom1h4mcwxh7spaacc0dlt8us684.png "/>650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/8C/CB/wKioL1h4mcagG8qCAACnGTx9wMk536.png "style=" float : none; "title=" 2.png "alt=" Wkiol1h4mcagg8qcaacngtx9wmk536.png "/>Clicking Run as->maven Install will download a lot of jar packages and the last build succeeds.650) this.width=650; "src=" Http://s5.51
; Property>Bean>3. Modify the language of the running environment after successful login // if ("EN" .equals (Logonuser.getlanguage ()) {Locale Localeen = new Locale (" en "," en " else if ("JA" .equals (Logonuser.getlanguage ())) {Locale LOCALEJP = new Locale ("ja", "JP" else {Locale Localeen = new Locale ("en", "en" 4. Define methods for acquiring classical Chinese contentprotected string GetMessage (String code,object ... params) {return messagesource.getmessage (code
Controller control page Jump processing foreground background data interactive access ServiceDAO Layer: @Repository Database access layer additions and deletions to the JPA specification of the Hibernate JAP warehouse JPA Automatic parsing method name using @query (sql| | HqlDomaon layer: The entity bean is the table of the database in which the @entity @Table correspondence between the PojoService Layer: @Service Implementation some JPA can parse without access to the DAO layer can not be resol
-define the location of the JSP file - Beanclass= "Org.springframework.web.servlet.view.InternalResourceViewResolver"> Propertyname= "prefix"value= "/web-inf/views/"/> Propertyname= "suffix"value= ". jsp"/> Propertyname= "Viewnames">Array>valuetype= "Java.lang.String">login*value>Array> Property> Bean>If you have multiple file paths (for example: webapp/), you can define multiple resolver, configure different viewnames or different mediatype to differentiate which
the message body itself is a JSON.This way, spring will do the processing when it receives the JSON and convert it to an object. This is not the time to use Request.getparameters to obtain this request information.See requests and responses from Jemeter:
Post Http://localhost:8060/tstbody
Post data:
{' OpenID ': ' JMeter ', ' sign ': ' Sign '}
[no cookies]
Request Headers:
connection:keep-alive
content-type:application/json
:
content-length:33
ho
Recently, the spring MVC framework is used in the project. After reading some documents, I have forgotten it.
1. The spring MVC Architecture adopts the command + controller mode. The overall framework is shown in:
The core controller is dispatcherservlet, and the returned view object is the modeandview object.
2. In t
In today's MVC framework, it seems that WEBWORK2 is gradually becoming mainstream, and the combination of webwork2+springframework is becoming more and more popular. This seems to imply that spring's own MVC framework is far worse than WEBWORK2, so everyone is replacing it with WEBWORK2. Indeed, Spring's MVC framework is not a central part of the whole
1. How to learn spring?You can learn spring in the following ways:(1) Examples of mvc-step-by-step and sample directories in the doc directory in spring download packages are examples of better
("info", "Objtransaction server recv:" +d.getusername () + "" +d.getpassword ()); return "testpage.jsp"; }Front desk is still the last page, change some action on the line.In addition, Spring MVC can use beans to receive parameters because it is reflection technology, so attribute fields remain exactly the same.public class User { private String username; private String password; Public
Official materials:
What is spring. net used? Http://www.springframework.cn/
What is nhib.pdf? Http://www.springframework.cn/
Understanding ASP. net mvc: Learning ASP. net mvc 1.0 from scratch http://www.cnblogs.com/zhangziqiu/archive/2009/02/27/aspnet-mvc-1.html
Watch the video on webcast: the ASP. net
As a Java Web application developer, you have quickly learned the request (HttpServletRequest) and session (HttpSession) scopes. When designing and building Java WEB applications, it is important to understand these scopes and how to interact with objects and those scopes. "There is an article on StackOverflow that will help you quickly understand the request and session scope"SPRING MVC ScopeWhen I started
1. Import Jar Package
Validation-api-1.0.0.ga.jar This is a more critical jar package that is primarily used to parse annotation @valid.
Hibernate-validator-4.3.2.final.jar can download the latest, this package is particularly important in the annotation encoding.
The other is some log packages (not necessarily all need): Jboss-logging-3.1.3.ga.jar, Slf4j-log4j12-1.6.1.jar
2. Structure diagram of Web project
The main structure of the project, not clear the environm
Spring 3Interest at thisSpring 3 MVC Hello World example.In Spring MVC Web application, it consist for 3 standard MVC (Model, Views, Controllers) components:
Models–domain objects that is processed by service layer (business logic) or persistent layer (database oper
Recent company projects to start using spring MVC instead of Struts2, learn about the use of spring MVC. This is the first spring MVC program, using both XML and annotations.First, buil
In the spring MVC project, you only need to put the log4j. xml file under the src/main/resources directory, and the log will work.
I still don't know which line of code is imported into the configuration file.
Example of a log4j. xml file:
Next to a blog post, there is no database connection pool, purely with the official JPA link. So this time we're going to add a connection pool. This article uses Druid Connection pool to implement multi-data source configuration. Persistence.xml This file can be omitted, all configured in Applicationcontext.xml: other places do not need to be changed by the last configuration. That's good. reprinted from: Http://www.loveweir.com/html/19.htmlSpring 4+ JPA (hibernate 3/4) +
One, five core components1.DispatcherServlet Request Entry2.HandlerMapping request dispatch, responsible for the request and the controller to establish one by one corresponding relationship3.Controller processor4.ModelAndView Package model information and view information5.ViewResolver view processor, positioning pageTwo, Spring MVC writing step (access to the. JSP under Web-inf)1. Build the project, impor
Spring MVC integrated Velocity template
Spring MVC
We used struts2 when using the traditional configuration file in a way that did not use the legendary 0 configuration. SPRING3 MVC can be thought of as having 100% 0 configured (in addition to configuring
Initial Spring MVC and initial springmvc
1.
1. Introduction to Spring MVC
Spring MVC is a follow-up product of SpringFrameWork and has been integrated into Spring Web Flow. The
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.