个人主页 | HomePage : yeecode.top
yeecode / mybatiscn Goto Github PK
View Code? Open in Web Editor NEWMyBatis中文详尽注释版。书籍《通用源码阅读指导书——MyBatis源码详解》配套注释版源码。
Home Page: http://yeecode.top
License: Apache License 2.0
MyBatis中文详尽注释版。书籍《通用源码阅读指导书——MyBatis源码详解》配套注释版源码。
Home Page: http://yeecode.top
License: Apache License 2.0
个人主页 | HomePage : yeecode.top
关于MapperMethod中resolveMappedStatement()方法的注释
@param declaringClass 操作方法所在的类。一般是映射接口本身,也可能是映射接口的子类
这里子类应该改作父类吧,interface A(amethod)--extend-->interface B(bmethod),B的实现类应该实现a&b两个方法,如果namespace:B中只映射了b方法,不过A的实现类namespace:A实现了a方法,getMap(B.class).amethod因为B没实现,mybatis会找到父接口的实现类来实现吧。很喜欢yee的书,如指正有误,望回复
文中写的是:
copyBeanProperties方法的工作原理非常简单:通过反射获取类的 所有属性,然后依次将这些属性值从源对象复制出来并赋给目标对象。 但是要注意一点,该属性复制器无法完成继承得来的属性的复制,因为
getDeclaredFields方法返回的属性中不包含继承属性。
这个是可以获得继承来的属性的,他循环复制属性后,最后会获取父类判空继续循环父类的属性进行赋值
P34 代码3-30中,"return handler.query"应改为"return handler.query";
P34 倒数第二行,"handler.query"应改为"handler.query";
P35 代码3-32中,"return resultSetHandler.handleResultSets"应改为"return resultSetHandler.handleResultSets";
P35 倒数第7行,"为 h>statement>result"应改为"为 h>statement>results";
P36 第一行,"交给ResultHanlder对象"应改为"交给ResultSetHanlder对象";
P36 第三行,"交给ResultHanlder对象"应改为"交给ResultSetHanlder对象","ResultHandler是"应改为"ResultSetHandler对象是";
P45 5.1.2下第五行,"则必须继承Serializable接口"应改为"则必须实现Serializable接口"
P84 图8-1下第二行,"BaseTypeHandler继承了"应改为"BaseTypeHandler实现了","并实现了TypeHandler中的接口"应改为"并实现了TypeHandler中的抽象方法"
P101 代码10-2下第一行,"而对象适配器Adaptee"应改为"而对象适配器Adapter"
P141 图14-1上第三行,"不需要关系建造对象的细节"应改为"不需要关心建造对象的细节"
P148 倒数第三行,"赋予默认的属性名称"expression""应改为""赋予默认的属性名称"property""
P174 代码15-9上第三行,"如果sex的值为0,则最终输出结果为Girl对象"应改为"如果sex的值为1,则最终输出结果为Girl对象","如果sex的值为1,则最终输出结果为Boy对象"应改为"如果sex的值为0,则最终输出结果为Boy对象"
P280 代码20-2中第2行,"connection.setAutoCommit(true);"应改为"connection.setAutoCommit(false);";
P285 21.2上第三行,"那么这个类可以继承Iterable接口"应改为"那么这个类可以实现Iterable接口";
P285 21.2下第二行,"并使用List接受这些对象"应改为"并使用List接收这些对象";
P286 21.4下第二行,"DefaultCursor类直接或间接继承了"应改为"DefaultCursor类直接或间接实现了";
P288 21.4.3下第一行,"CursorIterator类继承了"应改为"CursorIterator类实现了";
P288 21.4.3下第er行,"DefaultCursor类间接继承了"应改为"DefaultCursor类间接实现了";
P296 22.1.1下第二行,"则必须继承Serializble接口"应改为"则必须实现Serializble接口";
P296 22.1.1下第四行,"我们还给出了继承"应改为"我们还给出了实现";
P296 22.1.1下第五行,"继承Serializable接口"应改为"实现Serializable接口";
P296 倒数第五行,"而继承Externalizable接口"应改为"而实现Externalizable接口";
P302 第二行,"可以用图22-6将继承Externalizable"应改为"可以用图22-6将实现Externalizable";
P302 图22-6下第一行,"继承Serializable接口的类"应改为"实现Serializable接口的类";
P303 第六行,"而ThreadLocal是典型的“时间换空间”思路的应用"应改为"而ThreadLocal是典型的“空间换时间”思路的应用";
P324 倒数第十一行,"我们知道,在继承了Serializable"应改为"我们知道,在实现了Serializable";
P324 倒数第一行,"与之一起消失的还有MetaObject对象和ResultLoader对象"应改为"与之一起消失的还有MetaObject对象和Log对象";
P325 代码 22-33上第一行,"调用代码22-33所示的createProxy方法"应改为"调用代码22-33所示的crateProxy方法";
P325 代码22-33中倒数第二行,"static Object createProxy(...)"应改为"static Object crateProxy(...)";
P326 代码22-34上第七行,"代码22-33所示的createProxy方法"应改为"代码22-33所示的crateProxy方法";
P326 代码22-34上第六行,"则会让代理类继承WriteReplaceInterface"应改为"则会让代理类实现WriteReplaceInterface";
P331 图22-22中最后一行最左边,"BaseStatementHandler"应改为"SimpleStatementHandler";
P366 代码24-1中第3-6行,"// 创建三个工作人员实例...",建议可以去除;
"而对象适配器Adaptee不再继承目标类,而是直接持有一个目标类的对象" 是不是将Adaptee改为Adapter
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.