摘要: BasicDataSource.getConnection() createDataSource() createConnectionFactory():创建连接池工厂 createPoolableConnectionFactory() createConnectionPool():创建对象池保存活 阅读全文
posted @ 2018-03-02 16:22 背向我煮面 阅读(448) 评论(0) 推荐(0) 编辑
摘要: Spring集成Mybatis时定义了一个SqlSessionFactoryBean实例 进入SqlSessionFactoryBean可以看出,由buildSqlSessionFactory()加载配置信息 进入SqlSessionFactoryBuilder,可以发现里面的build()方法根据 阅读全文
posted @ 2018-03-02 13:02 背向我煮面 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Mybatis在操作数据库时,会先从SelSessionFactory获取session和executor,由executor执行数据库操作 executor由configuration生成,如果cacheEnabled为true,则executor为CachingExecutor cacheEna 阅读全文
posted @ 2018-03-02 12:58 背向我煮面 阅读(164) 评论(0) 推荐(0) 编辑