text: (window.webpackJsonp=window.webpackJsonp||[]).push([[75],{734:function(t,s,e){"use strict";e.r(s);var a=e(2),i=Object(a.a)({},(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h4",{attrs:{id:"mybatis中的-和-的区别"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#mybatis中的-和-的区别"}},[t._v("#")]),t._v(" Mybatis中的#{}和${}的区别")]),t._v(" "),e("ul",[e("li",[t._v("1、#{}是预编译处理，${}是字符串替换；")]),t._v(" "),e("li",[t._v("2、Mybatis在处理#{}时，会将sql中的#{}替换为?号，调用PreparedStatement的set方法来赋值；")]),t._v(" "),e("li",[t._v("3、Mybatis在处理${}时，就是把${}替换成变量的值；")]),t._v(" "),e("li",[t._v("4、使用#{}可以有效的防止SQL注入，提高系统安全性。")])])])}),[],!1,null,null,null);s.default=i.exports}}]);