Spring MVC file download

File download is to download files from the file server to the local. In spring MVC, there are two steps to download files: Step 1: use a file download hyperlink on the client. The href attribute in the link points to the method and file name of downloading the file in the background; Step 2: in the background controller class, use the file dow ...

Posted by timbolt on Wed, 25 May 2022 23:22:36 +0300

SpringMVC learning-----@InitBinder annotation

1. Annotation It can be seen from the literal meaning that the function of this is to initialize the Binder, and the method annotated by this can initialize the WebDataBinder. webDataBinder is for form to method data binding! @InitBinder only annotates methods in @Controller to register a binder initialization method for this controller, and t ...

Posted by microthick on Wed, 18 May 2022 13:04:15 +0300

Redis does interface current limiting, which is an annotation!

In addition to caching, Redis can also do many things: distributed locking, flow limiting, idempotency of request processing interface... Too much, too much ~Today, I want to talk with my friends about how to use Redis to deal with interface current limitation. This is also the knowledge point involved in the recent TienChin project. I'll bring ...

Posted by harley1387 on Tue, 17 May 2022 16:48:56 +0300

webMvc exception handling of Spring

Exception handling can be either front-end or back-end. From a safe point of view, both sides should be dealt with. This paper focuses on how to handle http request exceptions on the server. 1, Common exception types When we make an http request, there will be various possible errors, such as: 1. Service exceptions 2. The interface is abnormal, ...

Posted by flappy_warbucks on Mon, 16 May 2022 16:24:46 +0300

Spring MVC parameter binding details

summary I remember when I was debugging the interface with my front-end colleagues, the back-end spring MVC needed to receive the parameters of the array type, and then told the front-end that it needed to pass the array type. Later, the front-end children's shoes passed the array, but the back-end reception was unsuccessful and the joint debu ...

Posted by elum.chaitu on Sun, 15 May 2022 23:11:01 +0300

Two implementation methods of spring filter (MVC)

1. Concept The Interceptor of Spring MVC is similar to the Filter of Java Servlet. It is mainly used to intercept users' requests and handle them accordingly. It is usually used in functions such as permission verification, logging request information, judging whether users log in or not. Defining an interceptor in the Spring MVC framework ...

Posted by csn on Fri, 13 May 2022 02:03:43 +0300

SSM framework: SSM integration case

Integrated thinking Step 1: build an integrated environment Step 2: build a Spring development environment Step 3: integrate Spring MVC with Spring Step 4: integrate Mybatis with Spring We first configure each framework to ensure that each framework can be executed separately, and then carry out the integration operation. Integrated environme ...

Posted by eyegraphix on Tue, 10 May 2022 12:13:18 +0300

4. Data processing and jump

Tip: after the article is written, the directory can be generated automatically. Please refer to the help document on the right for how to generate it Data processing and jump ModelAndView Set the ModelAndView object and jump to the specified page according to the name of the view and the view parser Page: {view parser prefix} + viewN ...

Posted by girlzz on Fri, 06 May 2022 10:48:34 +0300

Refined Spring MVC source code analysis - initialization of WebApplicationContext container

This series of documents is summarized in the process of learning the source code of Spring MVC. It may not be very friendly to readers. Please combine my source code comments Spring MVC source code analysis GitHub address Read Spring version: 5.2.4 RELEASE With the popularity of Spring Boot and Spring Cloud in many large and medium-sized ente ...

Posted by sarun on Sun, 01 May 2022 22:30:54 +0300

Introduction and use of SpringMvc

SpringMVC 1. Review of prerequisite knowledge ​ MVC: It is a development mode, which is used to divide the application into model layer, control layer and view layer to better realize the separation of each layer and achieve the effect of high cohesion and low coupling ​ M(Model):Model layer, mainly refers to service|Dao|Model, mainly used f ...

Posted by Zangakat on Wed, 27 Apr 2022 13:39:04 +0300