Loading

随笔分类 -  mybatis

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

Loading