mybatis
问奈何w
这个作者很懒,什么都没留下…
展开
-
mybatis运行原理_getMapper
详细步骤从sqlSession.getMapper(XXXMapper.class);打断点进入。DefaultSqlSession类的getMapper方法@Overridepublic <T> T getMapper(Class<T> type) { return configuration.<T>getMapper(type, this);...原创 2020-05-04 13:06:19 · 328 阅读 · 0 评论 -
MybatisSqlSessionFactory启动原理
详细步骤调用sqlSessionFactoryBuilder类的build方法,然后从return build(parser.parse());进入XMLConfigBuilder类的parse方法public SqlSessionFactory build(InputStream inputStream, String environment, Properties properties...原创 2020-05-04 00:50:57 · 221 阅读 · 0 评论 -
mybatis之获取SqlSession对象
详细步骤在openSession()处加上断点并执行—>DefaultSqlSessionFactory类的openSession()方法@Overridepublic SqlSession openSession() { return openSessionFromDataSource(configuration.getDefaultExecutorType(), null, ...原创 2020-05-04 10:40:00 · 884 阅读 · 0 评论