Giter VIP home page Giter VIP logo

fuzhengwei / small-mybatis Goto Github PK

View Code? Open in Web Editor NEW
115.0 5.0 45.0 25 KB

在手写的过程中学习 Mybatis 从解析、绑定、反射、缓存,到回话和事务操作,以及如何与 Spring 进行关联注册 Bean 对象,完成整合部分功能逻辑。通过这些内容的拆解实现,读者伙伴就可以非常清楚的知道这些核心功能都是如何实现的了,以后再阅读 Mybatis 源码也就知道从哪开始到哪结束了。

Home Page: https://bugstack.cn/md/spring/develop-mybatis/2022-03-20-%E7%AC%AC1%E7%AB%A0%EF%BC%9A%E5%BC%80%E7%AF%87%E4%BB%8B%E7%BB%8D%EF%BC%8C%E6%89%8B%E5%86%99Mybatis%E8%83%BD%E7%BB%99%E4%BD%A0%E5%B8%A6%E6%9D%A5%E4%BB%80%E4%B9%88%EF%BC%9F.html

License: Apache License 2.0

Java 100.00%
mybatis

small-mybatis's Introduction

Mybatis 手撸专栏 - 完整源码:「关注公众号:bugstack虫洞栈 回复:手写Mybatis

像我们之前完成手写 Spring一样,拆解功能、简化流程、渐进实现,让读者能够更容易的学习到最有价值的知识。

在手写的过程中学习 Mybatis 从解析、绑定、反射、缓存,到回话和事务操作,以及如何与 Spring 进行关联注册 Bean 对象,完成整合部分功能逻辑。通过这些内容的拆解实现,读者伙伴就可以非常清楚的知道这些核心功能都是如何实现的了,以后再阅读 Mybatis 源码也就知道从哪开始到哪结束了。

源码

  • 全部完整源码获取说明:关注公众号:bugstack虫洞栈 回复:手写Mybatis
  • 全部完整源码获取说明:关注公众号:bugstack虫洞栈 回复:手写Mybatis
  • 全部完整源码获取说明:关注公众号:bugstack虫洞栈 回复:手写Mybatis

非常感谢你的支持,我愿意花费大量的假期时间编写干货的内容,也感谢你的鼓励和支持!

目录

1. 为甚,撸Mybatis

我就知道,你会忍不住对它下手!🤨

21年带着粉丝伙伴撸了一遍 Spring 源码,通过提取整个框架中的核心逻辑,简化代码实现过程,渐进式开发逐步实现 IOC、AOP 中的核心功能。让读者可以由浅入深的学习 Spring 的设计思路和落地代码,也能让更多的读者可以读懂 Spring 源码,当然这也包括让一些跟着动手实践的读者在面试中脱颖而出!

吃过小傅哥代码的读者,都知道TMD真香,网盘1个T的学习视频都删了,用来存小傅哥的技术资料。所以小傅哥日常也被读者催更,傅哥写Mybatis吧傅哥写Mybatis吧傅哥写Mybatis吧,既然你们都喊了这么久了,我也该把这事办了。

2. 好奇,驱动学习

从小傅哥最开始对 Mybatis 感兴趣,主要来自于好奇:**“为什么在使用 Mybatis 的时候,只需定义一个接口,不用写实现类就能使用 XML 中或者注解上配置好的 SQL 语句,就能完成对数据库 CRUD 的操作呢?” ** 原来这里最核心的是用到了接口代理类,把每一个数据库操作的 DAO 接口都用操作数据库的代理类实现,并注册到 Spring 容器让用户去使用。

Mybatis 代理实现调用封装返回结果

其实很多时候对技术的深度学习就是来自于这样一点点的好奇和一晚晚的折腾,虽然会遇到很多磕磕绊绊的 bug,但经过自己的思考、整理、验证、汇总,你终会提炼出最有技术价值的核心流程和脉络信息,就像我们上面这张图一样,虽然它不是全部但这却是最重要的一部分。

4. 计划,执行落地

  • 小傅哥之前也写过简版的 Mybatis、Mybatis-Spring,但当时主要是把重点放在和 Spring 的结合上,对于 ORM 的框架实现部分只是一个非常最基本的实现。
  • 所以计划这次按照 Mybatis 的框架结构,把重点放在 ORM 功能实现为主,通过源码分析和功能实现的方式完成这次框架功能的开发。在每次开发功能时候都会基于上次的章节进行内容迭代,慢慢的把这些功能类累加出来,这样的方式也更好让读者理解每一个功能都是怎么被设计进来并开发实现的。

5. 总结,一点建议

可能很多小伙伴的网盘都有几百G的资料的,但其实并没有时间去看,一方面是这些资料都是七七八八拼凑的,很难有一条完整的脉络,甚至有些资料已经过时了,只不过放在网盘里感觉心安一样。

小傅哥之前也收藏资料,把2T的网盘都塞满了,但过去这么多年了,也没看过。所以千万记住,别被无穷的资料,占用了有限的时间,只有成体系的学习才能收获最多。只追求快,那是最大的学习障碍!

small-mybatis's People

Contributors

fuzhengwei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.