"Mybatis Hand Rolling Column" Chapter 1: Introduction, I'm going to show you Mybatis!


Author: Brother Xiaofu
Blog: https://bugstack.cn

Precipitate, share, grow, and let yourself and others gain something!

1. Why? Mybatis

I knew it, you couldn't help but take it!

In 2021, I took my fan partners to read the Spring source code. By extracting the core logic in the entire framework, the code implementation process was simplified, and the core functions in IOC and AOP were gradually realized through progressive development. It allows readers to learn Spring's design ideas and landing codes from simple to deep, and also allows more readers to understand Spring source code. Of course, this also includes letting some readers who follow hands-on practice stand out in interviews!

have eatenlittle brotherReaders of the code know thatTMD really fragrant, the learning videos of 1 T of the network disk have been deleted, and they are used to store the technical materials of Xiao Fu. Therefore, Brother Xiao Fu is also urged by readers every day.Brother Fu wrote MybatisBrother Fu wrote MybatisBrother Fu wrote Mybatis, since you've been shouting for so long, I should do this too.

2. Curiosity drives learning

Brother Fu was interested in Mybatis from the very beginning, mainly from curiosity:"Why when using Mybatis, you only need to define an interface, and you can use the SQL statements configured in XML or annotations without writing an implementation class to complete CRUD operations on the database?"It turns out that the core of this is to use the interface proxy class, implement the DAO interface of each database operation with the proxy class that operates the database, and register it with the Spring container for users to use.

"Mybatis Hand Rolling Column" Chapter 1: Introduction, I'm going to show you Mybatis!

In fact, technology is oftendeep learningfrom this littlecuriousand one nighttoss, although you will encounter many stumbling bugs, but after your own thinking, sorting, verification, and summarization, you will eventually extract the most technically valuable core process and context information, just like the picture above, although it is not All but this is the most important part.

3. Goal, what does the liver look like

"Mybatis Hand Rolling Column" Chapter 1: Introduction, I'm going to show you Mybatis!

Like we have done handwritten Spring before, dismantling the function, simplifying the process, and implementing it gradually makes it easier for readers to learn the most valuable knowledge.

In the process of handwriting, learn Mybatis from parsing, binding, reflection, caching, to session and transaction operations, and how to associate with Spring to register Bean objects to complete the integration of some functional logic. Through the dismantling and realization of these contents, readers and partners can clearly know how these core functions are realized. After reading the Mybatis source code, they will know where to start and where to end.

4. Plan and execute

"Mybatis Hand Rolling Column" Chapter 1: Introduction, I'm going to show you Mybatis!

  • Brother Xiao Fu also wrote a short version of Mybatis and Mybatis-Spring before, but at that time, he mainly focused on the combination with Spring, and the framework implementation part of ORM was only a very basic implementation.
  • Therefore, it is planned to focus on the realization of ORM functions according to the framework structure of Mybatis this time, and complete the development of this framework function through source code analysis and function realization. Every time a function is developed, the content is iterated based on the last chapter, and these function classes are gradually accumulated. This way will also better allow readers to understand how each function is designed and developed.

5. Get in the car, let's go

The car is coming, the car is coming. In view of the past sharing and learning methods, for example, after the final course of Spring is written, it is made into a PDF to earn a little bit of hard work, but the effect is somewhat poor and it is easy to be prostituted PDF (I really hope to continue on the road of technology sharing)。

In fact, if a Spring study booklet like Xiao Fu is put on some platforms, the final income will be much higher than it is now, but I feel that this method will limit my ability.operate, I don't want to be too much publicized, I can get a P7 after learning! So if you'd like to join my planet, it's okay to support me.

Join to learn: https://t.zsxq.com/jAi2nUf

6. Conclusion, a little advice

Maybe many friends have hundreds of gigabytes of data on their network disks, but they don't have time to look at them. It's outdated, but it feels like it's at ease in the network disk.

Brother Xiao Fu also collected materials before, filling up the 2T network disk, but I haven't seen it for so many years. So do remember, don't be occupied by infinite materials and limited time, only systematic study can get the most. Only the pursuit of speed, that is the biggest learning obstacle!