{"id":17994632,"url":"https://github.com/pansonpanson/pansonpanson-mybatis-3-sourcecode-notes","last_synced_at":"2025-07-05T09:04:00.348Z","repository":{"id":37368615,"uuid":"264574254","full_name":"PansonPanson/PansonPanson-mybatis-3-sourcecode-notes","owner":"PansonPanson","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-08T01:09:25.000Z","size":1243,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T05:27:14.192Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PansonPanson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-17T03:16:27.000Z","updated_at":"2020-06-02T11:16:52.000Z","dependencies_parsed_at":"2023-01-17T14:31:35.827Z","dependency_job_id":null,"html_url":"https://github.com/PansonPanson/PansonPanson-mybatis-3-sourcecode-notes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PansonPanson/PansonPanson-mybatis-3-sourcecode-notes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PansonPanson%2FPansonPanson-mybatis-3-sourcecode-notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PansonPanson%2FPansonPanson-mybatis-3-sourcecode-notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PansonPanson%2FPansonPanson-mybatis-3-sourcecode-notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PansonPanson%2FPansonPanson-mybatis-3-sourcecode-notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PansonPanson","download_url":"https://codeload.github.com/PansonPanson/PansonPanson-mybatis-3-sourcecode-notes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PansonPanson%2FPansonPanson-mybatis-3-sourcecode-notes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263715095,"owners_count":23500238,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T20:15:54.672Z","updated_at":"2025-07-05T09:04:00.326Z","avatar_url":"https://github.com/PansonPanson.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003ccenter\u003eMyBatis 源码解析 \u003c/center\u003e\n\n在阅读MyBatis 源码之前，不妨先问自己两个问题：\n1. 为什么要阅读优秀开源软件的源码？\n2. 为什么要阅读 MyBatis 的源码？\n\n如果上面的两个问题，你心中还没有一个明朗的答案，不妨先听听笔者自己的想法。\n事有先后，笔者先自问自答第一个问题：为什么要阅读源码？\n+ 不妨回想一下初学写作的时候，我们是如何学会写作的：学会基本的拼音 -\u003e 大量的背诵、听写、默写 —\u003e 大量的仿写 -\u003e 大量的名著阅读 —\u003e 自由写作\n+ 不妨再回想一下初学编程的时候，我们是如何学会编程的：学会基本的语法 -\u003e 大量的 “hello world” -\u003e 参与小的工程项目 -\u003e 阅读优秀的代码实例 -\u003e 拆轮子与造轮子 -\u003e 参与复杂项目 -\u003e 学会架构设计\n\n有没有一种似曾相识的感觉！原来写作与编程的学习过程，有诸多相似之处。所以回过头来，我们可以试着回答一下第一个问题：为什么要阅读优秀开源软件的源码？\n\u003e 阅读优秀的开源软件源码能培养阅读者的“代码审美”，并且可以积累原始的“代码模板（类比写作好词好句）”，日积月累，会提高阅读者的编程能力；\n\n\u003e 阅读优秀的开源软件也可以打破隔膜，让阅读者知其然并知其所以然，拒绝“黑盒”。\n\n再尝试回答第二个问题：为什么要阅读 MyBastis 的源码？\n\u003e 首先这个问题应该只针对以 Java 为主语言的后端开发者，不可否认的是，国内的 Java 开发者对持久层框架的技术选型基本倾向于 MyBatis，所以 MyBatis 在受众与使用比例上，都是很流行的，所以深入了解 MyBatis 的源码是有现实基础的；\n\n\u003e 此外，MyBatis 本身作为一个轻量级的框架，本身并不复杂，对初学者的门槛也不算高，适合第一次接触开源框架的源码阅读爱好者。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpansonpanson%2Fpansonpanson-mybatis-3-sourcecode-notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpansonpanson%2Fpansonpanson-mybatis-3-sourcecode-notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpansonpanson%2Fpansonpanson-mybatis-3-sourcecode-notes/lists"}