[springboot series] customize an interceptor, with source code

Spring Boot version The version of Spring Boot on which this article is based is 2.3.4.RELEASE. What is an interceptor? Interceptor in Spring MVC is similar to Filter in Servlet. It is mainly used to intercept user requests and handle them accordingly. For example, the interceptor can perform permission verification, log the request informat ...

Posted by ghurtado on Tue, 23 Aug 2022 04:29:05 +0300

Java enumeration classes and annotations

classification Custom class enumerationImplementation using enum keyword Custom enumeration class code Constructor privatization to prevent direct newRemove the set related method to prevent the property from being modifiedCreate fixed objects directly in SeasonTo prevent the static method of the class from being loaded every time the pr ...

Posted by BooRadLey on Sun, 21 Aug 2022 09:29:12 +0300

SpringMVC interceptor and exception handling

catalogue 1, Interceptor configuration 2, Execution sequence of multiple interceptors 3, Exception handling based on configuration file 4, Annotation based exception handling 1, Interceptor configuration 1. Interceptors in springmvc are used to intercept the execution of controller methods 2. Interceptors in springmvc need to implem ...

Posted by darksystem on Fri, 05 Aug 2022 21:42:54 +0300

Front and rear end development summary-1

SpringBoot 1, The WebMvc configuration class of springboot makes the static resources inaccessible The webmvc configuration class of springboot causes an error in accessing the static file. The specific error reason is not known (no detailed look at the source code). Generally, inheriting the WebMvcConfigureSupport class will cause such problem ...

Posted by parka on Thu, 26 May 2022 00:47:09 +0300

[SSM framework] Spring notes - AOP details; Use of four notifications in AspectJ

1. Aspect oriented programming AOP AOP (aspect oriented programming), aspect oriented programming. Facet: the common, general and repeated functions are called facets. Facet oriented programming is to extract the facets, develop them separately, and weave them into the methods to be called through dynamic agents.   2. "Evolution" of ...

Posted by nlhowell on Thu, 26 May 2022 00:40:17 +0300

spring boot: use redis+lua to limit the frequency of sending SMS verification codes (spring boot 2.3.2)

1. Why limit the sending frequency of SMS verification codes? 1, SMS verification code Each SMS has cost constraints, Certainly can not be brushed the random hair of the interface And the interface is brushed will affect the user's experience, Affect the normal access of the server, So even with the protection of graphic verification codes, etc ...

Posted by shashiku on Wed, 25 May 2022 21:42:39 +0300

[SSM framework] Spring notes - Spring overview; Detailed explanation of IOC control inversion

1. What is the Spring framework It is a container that integrates other frameworks. Its core is IOC and AOP. Spring framework consists of more than 20 modules, which provides excellent solutions in many fields.   2. Features of Spring 1) Lightweight It is composed of more than 20 modules. Each jar package is very small, less than 1M, and the ...

Posted by F1Fan on Wed, 25 May 2022 21:29:24 +0300

[CRM learning and development Day1 of SSM framework project customer relationship management system]

1.1 home page function demand When users visit the project home page, they first enter the login page. Timing & flow IndexController @Controller public class IndexController { /* Theoretically, assign a url to the Controller method: http://127.0.0.1:8080/crm/ For simplicity, the protocol: / / ip:port / application ...

Posted by goldfiles on Wed, 25 May 2022 00:07:31 +0300

Tear spring and spring MVC parent-child containers by hand

1, Background Spring and spring MVC have a parent-child container relationship, and it is precisely because of this that the problem of package scanning often occurs. Here we analyze and understand the parent-child container relationship between spring and spring MVC, and give the official recommended method of package scanning in spring and sp ...

Posted by piyushsharmajec on Tue, 24 May 2022 03:28:59 +0300

Spring IOC/AOP use and source code explanation

Spring-IOC Hi! This is the welcome page that you will display for the first time using the Markdown editor. If you want to learn how to use the Markdown editor, you can read this article carefully to understand the basic syntax of Markdown. Use of IOC s Basic use of IOC Import spring's pom configuration <dependencies> &lt ...

Posted by devxtech on Mon, 23 May 2022 21:49:15 +0300