In recent times, a cursory look at the spring source provides a deeper understanding of spring's two core and spring components. At the same time in learning Spring source code, you have to understand some design patterns, or read the source code is still a certain difficulty, so some important design patterns simple to do the elaboration. It will also simply add some of the design principles mentioned in the Gof. Spring's source reading series, also temporarily. Here's how to take you into the spring world:
The Spring Series Primer
1) Spring Webapplicationcontext initialization and extinction
This section helps us understand how spring initializes the Webapplicationcontext. What has been done to initialize it? What exactly is the use of the Servletcontextlistener we configured in Web. XML ? Where is the entrance to the IOC? Will get the answer here.
Spring IOC
2) design and implementation of IOC container (i)--beanfactory
This section helps us to solve the following problems:
What is IOC, DI, DIP? What do beanfactory do, and how do he achieve it? How do I dynamically load resources by programming? What is the relationship between Beanfactory and ApplicationContext?
3) design and implementation of IOC container (ii)--applicationcontext
By looking at this section, you will know the following reasons for these problems:
Why does spring officially recommend using ApplicationContext instead of beanfactory? Where is the difference between Webapplicationcontext and ApplicationContext?
Spring AOP
4) Spring AOP design and Implementation (a): Dynamic agent
This is not a simple article about the Java Dynamic Agent. Read this article and you will see what is the proxy mode? Where is the proxy mode used primarily? How is the Java Dynamic Agent implemented? Have you ever guessed what a dynamic proxy generated class is?
5) Simulation of Java EE filter
The people who learn Java EE are not unfamiliar with the filter in Java EE, but can you imagine how it is implemented? Why do you learn Java EE filter in spring AOP, and what is the management of both?
6) Misunderstood interceptor in Struts2
People who have used Struts2 will have a certain understanding of interceptor, but do you know the right ones? There are interceptor in Struts2, MyBatis, Spring and jfinal, and even in Java, are their principles the same? What is the relationship between interceptor and filter, and what are the similarities and differences? Why do you learn interceptor in spring AOP, and what is the management of both? What is the relationship between Interceptor and AOP?
After reading this article, the above problems will be solved.
7) Standard AOP and spring AOP
Standard AOP, never heard of it? AOP Alliance, never heard of it? Those important roles of Spring AOP: Aspect, PointCut, joinpoint, advice, and so on. Can you summarize what spring AOP does in a nutshell?
8) design and implementation of Spring AOP + ASPECTJ using the API of standard AOP
What kinds of AOP implementations do you create in spring? The implementation of Spring AOP+ASPECTJ can you simulate it? Spring AOP has something to do with the dynamic agent of the JDK, do you build it?
Spring MVC
9) Spring MVC initialization
Spring's MVC framework do you understand? What did the process do with those things? Where does the bean definition in namespace-servlet.xml be loaded you know?
how Spring MVC handles HTTP requests
Aren't you curious about how spring MVC handles HTTP requests? File upload, it must be in the namespace-servlet.xml to do the relevant configuration? What design patterns are involved in this part of the interview, and will you falter?
Data access under Spring
11) Template method and callback function
is not that data access, how to mention the template method mode? The template method to mention the mode of forget, I also mention callback it? JdbcTemplate You build it?
design and implementation of Spring JDBC component
Do I have to use spring in conjunction with an ORM such as hibernate? Do you know that there is a beloved in spring who is called JdbcTemplate waiting for you?
how spring supports various ORM frameworks
For spring is how to support those data access framework, you are not curious, I do not know, anyway I was curious. The template method pattern that you learned earlier is not just about the spring JDBC component.
Spring Transaction Processing
14) transaction-related
Here is a brief description of the transaction, if you want to see the spring transaction, this section can not be ignored, think it will take you to understand ... (Distributed transactions, programming transactions, etc.)
This chapter will also be on the network most of the issues related to the collation of the article, you do not have to search the Internet, it is enough.
the foundation of Spring transaction management
You may have heard of using declarative transaction management or programmatic transaction management, but do you know they are the same at all? Do you know the configuration of TransactionManager?
design and implementation of spring declarative transaction processing and programmatic transaction processing
Emma, you're finally out, you can't wait.
If you read through these articles and understand them, then the series should take you out of spring, because you understand the design and implementation of the spring core and its various components, which is the essence of your learning.
At the same time, there may be some flaws in these articles, please correct them. We learn together and make progress together.