Mybatis框架-----Mapper 动态代理原理
🍎姓名:洋葱爱代码🍎 🍊喜欢:Java编程🍊 🍉重要的事情说三遍!!!🍉 🍓欢迎大家来访问哦,互相学习🍓 🍋欢迎大家来访问哦,互相学习🍋 🍑欢迎大家来访问哦,互相学习🍑
✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨
🍎合抱之木,生于毫末;百丈之台,起于垒土;千里之行,始于足下。------《老子》
🍊今日学习任务!!!!!
🍊1、了解代理对象 MapperProxy和MapperMethod 对象
🔥一、获取代理对象 MapperProxy
public <T> T getMapper(Class<T> type, SqlSession sqlSession) {
final MapperProxyFactory<T> mapperProxyFactory =
(MapperProxyFactory<T>) knownMappers.get(type);
if (mapperProxyFactory == null) {
throw new BindingException("Type " + type + " is not known to the MapperRegistry.");
}
try {
return mapperProxyFactory.newInstance(sqlSession);
} catch (Exception e<