Spring introduction and application - IOC

Spring is a lightweight IOC (inversion of control) / di (dependency injection) and AOP (aspect oriented programming) framework. The author of spring believes that All objects used in business [create, initialize and destroy] should be managed by Spring, so as to simplify the development code; 1, IOC The control is reversed, and the creation, ...

Added by Tristan Wells on Wed, 05 Jan 2022 20:39:32 +0200

SpringSecurity Filter WebAsyncManager IntegrationFilter

Original Address Starting with ThreadLocal, ThreadLocal can be understood as a Map bound to the current thread, where key is the current thread and value is the object to store. When we are in the same thread, we can get the value through the get() method. If get () is called on the A thread set(object) and then on the B thread, the key is A b ...

Added by liza on Wed, 05 Jan 2022 20:05:52 +0200

Write a Spring framework with 300 lines of code. Although the sparrow is small, it has five dirty parts

This article is excerpted from Spring 5 core principles1 custom configuration1.1 configure application Properties fileFor the convenience of parsing, we use application Properties instead of application XML file. The specific configuration contents are as follows: scanPackage=com.tom.demo 1.2 configuring web XML fileAs we all know, all projects ...

Added by roach on Wed, 05 Jan 2022 16:01:49 +0200

SpringBoot uses the ApplicationListener listener

Usage scenario In some business scenarios, after a series of actions such as initialization, restart and shutdown of the Serverlet container, some operations need to be processed, such as loading some data, initializing the cache, registering specific tasks, and so on. At this time, we can use the ApplicationListener provided by Spring to oper ...

Added by glory452 on Wed, 05 Jan 2022 15:12:12 +0200

2022 Java timing new posture StopWatch

1, Background   sometimes we need to record the execution time of each task or the execution time of a piece of code during development. The simplest way is to print the difference between the current time and the execution completion time. Generally, we detect the execution time of a piece of code in the following way: public static voi ...

Added by Alelinux on Wed, 05 Jan 2022 12:11:19 +0200

SpringBoot entry to mastery

Introduction: Course Overview Reprint (invasion and deletion): https://gitee.com/eson15/springboot_study Course catalogue Introduction: Course OverviewLesson 01: Spring Boot development environment setup and project startupLesson 02: Spring Boot returns Json data and data encapsulationLesson 03: Spring Boot using slf4j for loggingLesson 04: ...

Added by Bojan86 on Wed, 05 Jan 2022 11:23:14 +0200

Introduction to MyBatis

Introduction to MyBatis Building SqlSessionFactory from XML Each MyBatis application is based on an instance of SSF (SqlSessionFactory), which can be obtained through SSF Builder. SSF Builder can build an SSF through XML configuration file or configuration class. It is very convenient to build SSF through XML files. It is recommended to use ...

Added by mpiaser on Wed, 05 Jan 2022 10:52:39 +0200

Spring Boot+Spring Security realize automatic login function (actual combat + source code analysis)

Automatic login is a very common function in software development. For example, we log in to QQ email: In many websites, we will see similar options when logging in. After all, it is very troublesome to always let users enter their user name and password. The automatic login function is that after the user logs in successfully, if the use ...

Added by abhi_10_20 on Wed, 05 Jan 2022 10:22:17 +0200

Spring Security: user UserDetails source code analysis

The object of Spring Security authentication and authorization is the user. The user mentioned here can be defined in the configuration file, stored in the database table, or automatically created by Spring Security (Spring Security will automatically create the user when there is no user or user source related configuration), Spring Security u ...

Added by paggard on Wed, 05 Jan 2022 10:09:24 +0200

win10 Idea builds spring 5.3 10-snapshot source code environment

Tools used idea2020.3 gradle6.8.3 openJDK1.8.0_302 spring5.3.10-SNAPSHOT Download path of gradle and openJDK (1 point): https://download.csdn.net/download/qq_22843051/20619765 Java installation steps openJDK1.8.0_302 download address (there is a point here. It's not easy to find this version) https://download.csdn.net/download/qq_228 ...

Added by llama on Wed, 05 Jan 2022 07:11:06 +0200