随笔分类 - mybatis
摘要:Mybatis事务管理 事务管理方式 Transaction接口 public interface Transaction { Connection getConnection() throws SQLException; void commit() throws SQLException; voi
阅读全文
摘要:sqlSession 是mybatis的核心操作类,其中对数据库的crud都封装在这个中,是一个顶级接口,其中默认实现类是DefaultSqlSession这个类, 为什么说DefaultSqlsession不是线程安全的? 首先我们都知道mybatis在底层都是使用的JDBC,而JDBC这本来就是
阅读全文
摘要:关于mybatis的执行流程和源码 Mybatis解析 select * from user where name =? and pwd=? 1. statement:select * from user where name = and pwd=(采用直接拼接的方式,有sql注入的风险) 2. p
阅读全文

浙公网安备 33010602011771号