摘要:
Mybaits加载执行该xml配置 class SqlSessionFactoryBean implements FactoryBean<SqlSessionFactory>, InitializingBean spring 在初始化 sqlsessionbean的时候通过createBean调用了 阅读全文
posted @ 2018-08-23 17:52
暖暖-木木
阅读(1938)
评论(0)
推荐(0)
摘要:
背景 执行一个Sql查询MyBatis做了什么操作? //1SqlSessionFactory 创建sqlsession SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream); 阅读全文
posted @ 2018-08-23 17:52
暖暖-木木
阅读(284)
评论(0)
推荐(0)
摘要:
SqlSession是Mybatis最重要的构建之一,可以认为Mybatis一系列的配置目的是生成类似JDBC生成的Connection对象的statement对象,这样才能与数据库开启“沟通”,通过SqlSession可以实现增删改查(当然现在更加推荐是使用Mapper接口形式) 1 .sqlse 阅读全文
posted @ 2018-08-23 16:43
暖暖-木木
阅读(15585)
评论(0)
推荐(1)

浙公网安备 33010602011771号