
Mybatis
Jacob_Zheng
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
mybatis 中生成的字段不带引号 #{}和${}
#{},和 ${}传参的区别 1) 使用#{参数}传入会加上单引号,sql语句解析是会加上"" 比如 select * from table where name = #{name} ,传入的name为小李,那么最后打印出来的就是 select * from table where name = ‘小李’,就是会当成字符串来解析 #{}传参能防止sql注入,如果你传入的参数为 单引号'...转载 2018-07-18 17:13:26 · 5128 阅读 · 0 评论 -
MyBatis拦截器使用
官方文档 :http://www.mybatis.org/mybatis-3/zh/configuration.html#plugins MyBatis 允许你在已映射语句执行过程中的某一点进行拦截调用。默认情况下,MyBatis 允许使用插件来拦截的方法调用包括: Executor (update, query, flushStatements, commit, rollback, getTra...原创 2019-03-14 11:23:24 · 934 阅读 · 0 评论