Preliminary understanding of IOC container
1,IOC
Inverse of Control – IOC, control reversal, reversing the control of the object to Spring!
Using IOC can solve the problem of high coupling of programs
Control reversal
Suppose I need a function. In this function, I need to call the service layer, and then call the dao layer to get the data. Traditional Java EE development direc ...
Posted by CircularStopSign on Wed, 02 Mar 2022 01:35:10 +0100
Bean management of Spring framework
1. What is Bean management
bean management refers to the following two operations
1. Create object
2. Injection attribute
2. Two methods of bean management operation
xml based implementation of configuration file 1
2. Implementation based on annotation
3. Implement Bean management and attribute injection based on xml configur ...
Posted by rptasiuk on Sun, 20 Feb 2022 06:11:46 +0100
Inventory springboot: application main process
I preface
This article introduces the main process of SpringBoot Application
The main process entry of spring application is very simple:
@SpringBootApplication
public class BaseApplication {
public static void main(String[] args) {
SpringApplication.run(BaseApplication.class, args);
}
}
1 > use @SpringBootApplication Not ...
Posted by rajan on Sat, 19 Feb 2022 08:05:43 +0100
ByxContainerAnnotation -- an annotation based lightweight IOC container
ByxContainerAnnotation is a lightweight IOC container based on annotations that mimics Spring IOC. It supports constructor injection and field injection, circular dependency processing and detection, and has a highly extensible plug-in system.
Project address: https://github.com/byx2000/byx-container-annotation
Maven introduction
<reposit ...
Posted by brewmiser on Thu, 10 Feb 2022 10:27:34 +0100
Pure handwriting implementation of Spring source code framework
In the previous article, we completed the loading object defined by Bean. This time, we completed the scope to obtain the value value, write the metadata and set the BeanName
scope system Define scope source data class ScopeMetadata
/**
* Define scope source data class
*/
public class ScopeMetadata {
//Define the default values for the ...
Posted by vaavi8r on Tue, 08 Feb 2022 23:25:57 +0100
03 -- framework summary SS+M(Spring) -- function test (Part 2)
Part I: 03---Spring function test (Part I)
catalogue
1. loc write configuration file to develop spring config xml
2.loc annotation development
3. Simulate the underlying principle of spring IOC
---1. Create bean; Class, record the class name and the full path of the class
---2. Create MyIOC class ---- > to simulate your own IOC
1. Tel ...
Posted by gwolgamott on Thu, 03 Feb 2022 06:44:17 +0100
Bean assembly method
There are three assembly methods in Spring:Explicit configuration in xmlExplicit configuration in javaImplicit auto assembly beanExplicit configuration in xmlquote How spring IOC creates objectsConfiguring object properties in an xml fileExplicit configuration in javaquote Derivation of spring IOC theoryWhen actually calling the dao layer, you ...
Posted by neo0506 on Thu, 03 Feb 2022 05:54:20 +0100
Spring learning -- Spring Bean management
Spring Bean management
xml based configuration mode
bean configuration requires spring managed classes id generated object name Class full class name name object alias, which can be multiple scope: Singleton (default): there is only one bean instance in Spring, singleton mode Prototype: when the prototype getBean(), new Bean() Request: each h ...
Posted by tsabar on Mon, 31 Jan 2022 16:59:36 +0100
Implementation of AOP from static agent to dynamic agent Emit
[preface]
AOP is the abbreviation of Aspect Oriented Programming, which means Aspect Oriented Programming technology.
What is section?
A code segment without any coupling with the business, such as calling log, sending mail, and even routing distribution. All codes that can be owned by the code and can be fully decoupled from the code can be r ...
Posted by gio2k on Sun, 30 Jan 2022 03:17:46 +0100
Automatic configuration of source code analysis
automatic assembly
According to the jar package dependency we added, some configuration class bean s will be automatically registered into the ioc container. We can use @ autowired or @ resource annotations where necessary
Question: how is Spring Boot automatically configured and which components are automatically configured?
We know that th ...
Posted by abigbluewhale on Sat, 29 Jan 2022 18:00:54 +0100