springboot auto scan added BeanDefinition source code analysis
1.
During springboot startup, the bean definitions to be loaded will be collected and added to BeanFactory as BeanDefinition objects.
Since there are only getBean and other methods to obtain bean objects in BeanFactory, adding BeanDefinition to BeanFactory is through void registerBeanDefinition(String beanName, BeanDefinition beanDefinitio ...
Posted by amit.patel on Tue, 15 Feb 2022 04:19:00 +0100
"springcloud 2021 series" Spring Cloud Gateway + OAuth2 + JWT realize unified authentication and authentication
Carry out unified authentication through authentication service, and then verify authentication and authentication through gateway.
Nacos will be used as the registration center, Gateway as the Gateway, and nimbus Jose JWT JWT library will be used to operate JWT tokens
Theoretical introduction
Spring Security is powerful and easy to ...
Posted by chrisranjana on Tue, 15 Feb 2022 01:35:40 +0100
Source Understanding FactoryBean and BeanFactory Differences in Spring
Catalog
Preface:
Text:
What is BeanFactory?
What is FactoryBean?
Use of FactoryBean
Underlying Source Code Interpretation of FactoryBean
The difference between with and without an identifier
Summary:
Preface:
Now it's also a good time for Gold, Silver and Silver to jump around. When asked about the Spring Framework during an intervie ...
Posted by thebopps on Mon, 14 Feb 2022 19:12:38 +0100
Detailed explanation of Spring IoC Foundation
1. Introduction to spring IOC
IoC: inversion of control. In the traditional development mode, developers create and manage objects by themselves. When the Spring framework is used, these things are handed over to the framework. It can be understood that "the management right of developers over objects to the framework". Therefore, th ...
Posted by alext on Mon, 14 Feb 2022 03:17:54 +0100
Let's talk about the synchronized keyword
Basic use of synchronized
Object lock
Custom object lock
/**
* Object lock example 2
*/
public class SyncObjLock2 implements Runnable{
private static SyncObjLock2 instance=new SyncObjLock2();
private Object lock1=new Object();
private Object lock2=new Object();
/**
* You can see that using sync will cause threads to ...
Posted by mandukar on Sun, 13 Feb 2022 09:43:53 +0100
Spring learning: AOP operation
1, AOP operational terminology
1. Connection point
The methods in the class that can be enhanced are called join points.
2. Entry point
The method that is actually really enhanced is called the entry point.
3. Notification (enhanced)
(1) The logical part of the actual enhancement is called notification (enhancement)
(2) There are several ...
Posted by chmpdog on Sat, 12 Feb 2022 14:50:16 +0100
[SpringCloud component learning notes series] Config component
5. Use and explanation of SpringCloud Netflix Config
5.1 introduction
In the distributed system, due to the large number of services, the configuration files are scattered in different micro service projects, which is inconvenient to manage.
The Spring Cloud Config component is mainly used to centrally manage configuration files. It supports ...
Posted by acoole on Sat, 12 Feb 2022 13:00:02 +0100
[SpringCloud component learning notes series] OpenFeign component
3. Use and explanation of SpringCloud Netflix OpenFeign
Feign can hide the Rest request and disguise it as a Controller similar to spring MVC. It doesn't need to splice URL s, parameters and other operations by itself. Feign can take over these and complete them automatically.
3.1 use of Feign
3.1.1. Dependency import
In the pom file of con ...
Posted by pb4life55 on Sat, 12 Feb 2022 12:54:34 +0100
Spring mybatis core knowledge
Write in front
This is the core knowledge of spring mybatis, which can be used to review the eight part essay and deepen knowledge. It is recommended that you read it in the mode of breaking through the customs, and then check and fill the gaps according to the content. You are welcome to ask questions and learn from each other.
It was done b ...
Posted by Kazlaaz on Sat, 12 Feb 2022 10:40:21 +0100
Spring learning notes [XV] annotation programming
Annotation programming
01 what is annotation programming
:::info It refers to adding specific annotations to classes or methods to complete the development of specific functionsThe use of annotations is convenient for development, the code is concise, and the development speed is greatly provided :::
02 role of annotations
:::success ...
Posted by stan801003 on Sat, 12 Feb 2022 08:38:17 +0100