repository index updates on startup
5. Configuration of simple spring MVC
a). Open the Pom.xml file in the project and click on the Dependencies tab and click Add to add new dependencies
b). If you know the dependent group ID and artifact ID, you can fill it out directly, if not clear, you can enter the keyword to query, or to the http://search.maven.org site query
c). Dependencies that need to be
Build a Web development environment using IntelliJ IDEA and Maven Management (taking Spring MVC as an example)
I used MyEclipse all the time. After I changed my job, the new company used IDEA. I first got to know IDEA and found that wow, there are so many shortcut keys, but I think it is very useful all the way, especially with Maven management, it's a breeze. Of
About Spring MVC in the address bar access/WEB-INF under the. jsp, mvcweb-inf
WEB-INF is the protection of resources, direct access to the WEB-INF directory in the address bar under the page, will display 404, on why to put the page under the
. Ok.
Two: Use and configure the environment
1. New MAVEN Project:
File-new-other-maven-maven Project---Direct next--Enter WebApp in Filte (here for Web projects): Select a second, as shown in:
After the next step. The following figure:
The Group ID typically writes a large project name. The artifact ID is the child project name. (I write iflytek,sms here separately), click Finish. Maven's Web project is bu
Http://docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-multipart1. IntroductionSpring's built-in multipart support handles file uploads in Web apps. You can enable this support--through pluggable multipartresolver objects, they are all defined in the org.springframework.web.multipart pac
Problem Description:The JSP page under root webapp can be accessed directly via a URL, and the HTML page will report a 404 error.Solution 1:In Spring-mvc.xml, add the following configuration:Solution 2:Add in Web. xml:After spring MVC is configured, the HTML page in the Web
Spring Web MVC principle Learning (2), springmvc
Next, I wrote a blog post about this article. Based on a simple demo, I learned the principles of SpringMVC again:
1. Configure web. xml
Create a new web project, configure the Unified Access Point of the website in
, located in the ORG.SPRINGFRAMEWORK.WEB.SERVLET.MVC package. Because the controller needs to process the above requests for concurrent users, it is necessary to ensure thread safety and reusability when implementing the Controller interface. The controller will process the customer request, which is consistent with the role played by strutsaction. Once the controller has finished processing the customer request, the Modelandview object is returned to the Dispatcherservlet front-end controller.
stringredistemplate stringredistemplate; 5 6 private String channeltopic = "User:topic"; 7 8 /* Publish message to channel*/9 public void Publisher (String message) { Stringredistemplate.convertandsend ( Channeltopic, message); }12}I use stringredistemplate here, readers can use Redistemplate to set other serialization methods, you can see my previous blog. Subserviceimpl:public class Subserviceimpl implements Subservice { @Autowired private channeltopic
When using spring MVC, we will configure spring's dispatcherservlet as the requested forwarder.servlet> Servlet-name>SpringServlet-name> Servlet-class>Org.springframework.web.servlet.DispatcherServletServlet-class> Load-on-startup>1Load-on-startup>servlet>servlet-mapping> Servlet-name>SpringServlet-name> Url-pattern>/Url-pattern>servlet-mapping>Here Url-pattern is the set of request path pattern
1th Step: Introduce Shiro related jar packageEhcache-core-2.5.0.jarShiro-ehcache-1.2.3.jarShiro-core-1.2.3.jarShiro-web-1.2.3.jarShiro-spring-1.2.3.jarStep two: Web. XML configurationStep Three: Applicationcontext-shiro.xml configuration4th step: Enable Shiro annotation support in spring
Spring can easily integrate a variety of restful styles of web-service, but in fact SPRING-MVC has provided this support. You can generate XML, JSON, text, and other formats as needed. Generating XML relies on JAXB, mainly @xmlrootelement, @XmlAttribute, @XmlElement and other annotations, JDK1.6 began with JAXB. Genera
1. Building a project with MavenProblem with 2.SpringMVC absolute pathThe first thing to be clear, in HTML, the resource file also has its own URL, that is, the href is the absolute path support. The following code:When opened with a browserIn addition, you can also write this (here is to write the definition of the path variable, it is not recommended to write this)When opened with a browser, it is with IP address + port3. Issues where resource files cannot be displayedIn Springmvc, there are s
To use spring MVC you need to configure Spring MVC's front-end controller in Web project configuration file, XML Dispatchservlet123class>org.springframework.web.servlet.dispatcherservletclass>456789Ten One A - -How to configure Spring MV
1 PrefaceIn the history of the simplest Spring MVC tutorial (ix), we have implemented the image upload and display function, then, in this blog post, we further to the entity class (person) in the field "name" and the controller (PersonController) in the method Updatepersonlist as an example, the verification function of the parameters is realized.2 Annotation Ex
Spring MVC 4.1.6 Tutorial from Turorialspoint (English), official website: https://www.tutorialspoint.com/spring/index.htmOffline Version: (Link: https://pan.baidu.com/s/1hsvL7wS password: vg7x)Summarize:0, there is no Chinese translation of this article, in practice I have translated into Chinese (machine turn).1. My
Mapping arrays and collection classes in Spring Web MVC
In the above I mentioned the addition of the Command object's constructor: Options = Listutils.lazylist (new arraylist
Using the above method, when this question object is the first entry, there is no problem, change option is not a problem, but if the user increases the number of options in question, you
text character rendering defaults to DefaultwordrendererKaptcha.background.impl Authentication Code Background generator defaults to DefaultbackgroundKaptcha.background.clear.from Authenticode background color progressively defaults to Color.light_grayKaptcha.background.clear.to Authenticode background color progressively defaults to Color.WhiteKaptcha.image.width Verification Code picture width defaults to 200Kaptcha.image.height Verification Code Picture height defaults to 50(5) Verify that t
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.