The 1th chapter: Spring's overall architecture and environment construction
Spring is layered, mainly divided into network layer, database connection layer, core container layer, AOP layer and test layer.
IOC and Dependency injection are implemented in the core container by Beanfactory. The database connection layer encapsulates JDBC and is compatible with a variety of ORM frameworks.
The 2nd Chapter: the basic realization of the container
Defaultlistablebeanfactory is the core class for loading beans, and xmlbeanfactory inherits this class.
In three steps, first get the XML file validation mode principle, then convert the file into a Document object, and finally parse and register beandefinition.
How does the resource file load? The first definition of the Resource interface encapsulates the underlying resource. Different implementation classes are then encapsulated for resources from different sources. Finally, the resource control is given to Xmlbeandefinitionreader.
Get the XML file validation mode principle? Decide whether to include DOCTYPE, which is the DTD, or XSD.
The 5th chapter: Bean Loading
This chapter takes the interface beanfactory and its implementation class xmlbeanfactory as the core for the source code analysis.
Spring divides circular dependencies into three types: one is the constructor type, which cannot be resolved and can only be thrown beancurrentlyincreationexception. The second is the setter type, which can be solved by exposing the bean in the creation in advance. The third is the "prototype" scope of the bean, which is also not resolved, because spring does not cache "prototype" scope of the bean, the creation of the bean can not be exposed in advance.
A loop-dependent solution? When spring creates a singleton bean, in order to avoid circular dependencies, the bean is objectfactory exposed to the cache and supplied to other beans depending on the completion of its creation.
6th chapter: Container function expansion
This chapter takes the interface ApplicationContext as the core to carry on the source code analysis.
7th chapter: AOP
This chapter takes the principle of AOP implementation as the core for source code analysis.
12th Chapter: Spring Message
The Java Message Service, or JMS, is the Java platform-oriented messaging middleware API for asynchronous communication between program messages.
Spring can implement JMS through the integration of message middleware such as ActiveMQ.
Book Summary-spring Source depth Analysis