Spring Security: Basics

1. Getting to know Spring Security first1.1 Spring Security concept  Spring Security is a security framework implemented by Spring using AOP thinking and based on servlet filters. It provides a complete authentication mechanism and method-level authorization functions. It is a very good permission management framework. Spring S ...

Posted by msnhockey on Wed, 30 Nov 2022 20:01:39 +0300

Spring AOP (aspect-oriented programming) and AspectJ framework to achieve AOP (annotation)

What is AOP (1) Aspect-oriented programming (aspect), the use of AOP can isolate each part of the business logic, so that the coupling degree between the parts of the business logic is reduced, the reusability of the program is improved, and the efficiency of development is improved. (2) Popular description: Add new functions to the main funct ...

Posted by koen on Sun, 20 Nov 2022 00:31:39 +0300

Spring project autowiring & collection injection

1. Automatic configuration 1.1 What is dependency autowiring? The process that the IoC container automatically finds and injects into the bean according to the resources the bean depends on is called autowiring 1.2 What are the automatic assembly methods? By Type (Common)by nameBy construction methodAutowiring is not enabled 1.3 Prepare th ...

Posted by renu on Mon, 24 Oct 2022 08:38:13 +0300

SpringBoot handles global consent exception

SpringBoot handles global unified exceptions When an exception occurs in the backend or an error occurs in the request, the frontend usually displays as follows Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Fri Jun 07 15:38:07 CST 2019 There was an unexpected error (type=Not ...

Posted by intergroove on Sat, 15 Oct 2022 05:07:46 +0300

Talking about the Cron expression of the Spring Task timer

Preamble: 1. Spring Task is a lightweight timing task tool provided by Spring, which means that there is no need to add third-party dependencies, which is more convenient and easy to use than other third-party class libraries. 2. spring task is a timer class introduced after spring 3.0, which can be regarded as a lightweight quartz. Due to it ...

Posted by autumn on Thu, 06 Oct 2022 07:22:25 +0300

A long article to study Spring - DI

3 DI 3.1 setter injection of dependency injection Note: Dependency injection is actually a process of assigning values ​​to properties in the current bean; it is actually very simple to implement this process in Spring, you only need to create a sub-label property for the corresponding bean tag in the configuration file, and specify the n ...

Posted by the_NEWBIE_ON_THE_BLOCK on Mon, 03 Oct 2022 00:26:35 +0300

[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