Writing in the front

Good morning, boys and girls! Today is November 27th, 2020, Friday, sunny. I get up in the night, to start to learn again, yesterday saw LeiFengYang Spring annotations drive part of this tutorial, the teacher taught is 20 video, the first feeling is a good teacher, sometimes even into the source to see how a Spring inside would be like, is indeed a follow in the footsteps of the teacher can learn a lot of things, Here to thank LeiFengYang teacher taught such a good video, the second is to learn the brain is Fried, due to too much knowledge to learn, but I am such a stupid person, so in order to avoid forgetting yesterday learning knowledge, hence specially opened a new column, record the learning process dribs and drabs, can also be reference for newcomers to learn, I think that’s a good thing!

So today, let’s talk about annotation-driven development in Spring!

About the Spring

Speaking of the Spring framework, it is the absolute leader in Java development. Who in Java development does not know Spring? Who in Java development hasn’t used Spring? What company hasn’t used Spring in a Java Web project? If there is, it should be very few! So, if you choose the Java development path, you will have to master Spring!

Spring annotation driver

If you are still using basic frameworks such as Spring, SpringMVC, MyBatis, also known as SSM, to integrate development, you may write a lot of configuration files. The author wrote such a SSM project, namely Tao Tao Mall, the portal is “a Tao Tao mall project to you, I wish you have a brilliant future!” In the tao Tao mall project, I really wrote a lot of configuration files, interested students can write to play, not interested even if, write this project is more time-consuming.

However, with the rise of SpringBoot and SpringCloud, Spring’s annotation driver has become very popular! There are a lot of annotations. In order to have a deeper understanding of the principles of these annotations, we can better use these annotations to improve our work efficiency. Here, I’ll share with you how to use Spring annotations to improve your productivity and what’s behind the annotations!

Column arrangement

I have arranged this column based on the brain map in Lei Fengyang’s tutorial, which I will also present here, as shown below.



Based on the brain map above, I’ve divided this column into three broad sections: containers, extensibility principles, and the Web.

The container

Containers are the first part of this column, which includes:

  • AnnotationConfigApplicationContext
  • Component to add
  • The component assignment
  • Component injection
  • AOP
  • Declarative transaction

Extension principle

As the second major part of the entire column, extension Principles includes:

  • BeanFactoryPostProcessor
  • BeanDefinitionRegistryPostProcessor
  • ApplicationListener
  • Spring container creation process

In this part, we will take a look at the underlying source code and the running process of Spring. For many people, this part is quite boring and even kind of empty feeling. However, this part of the content must be mastered, remember is must master 😊, Because this is the path that ordinary programmers must take to become senior programmers.

This part plays a very important role in deep learning Spring framework. When reading this part of the article, you must debug the Spring source code according to the article yourself, so that you can have a deeper understanding of Spring.

Web

The Web, as the third major part of the column, covers:

  • servlet3.0
  • An asynchronous request

This part, which is actually SpringMVC, is where we’re going to focus on asynchronous requests.

Write in the last

The whole column has a certain depth of planning, it is recommended that you learn the basic knowledge of Spring in advance, preferably have some experience in the use of Spring and SpringMVC framework, if it is to know Spring and SpringMVC source code, that is great. Learning in this way can achieve twice the result with half the effort.

That’s all for now. Today is the beginning, and I hope I can keep going and finish this column perfectly. I also hope that after reading this column, you will no longer feel confused about Spring annotation-driven development.

Finally, I wish you all the best in learning about Annotation-driven development in Spring. Thank you 😂