注意 " ${ } " 这个是重点
按照普通的方式直接可以执行 #{} 动态传参方式也可以
重点 : 无法在sql中使用 ${}
和<if>
,<where>
标签 ,因为MyBatis 仅仅解析一次 ${}
sqlSourceParser.parse(context.getSql(), parameterType, context.getBindings());
此方法为解析 #{ } 动态参数的方法
注意 " ${ } " 这个是重点
按照普通的方式直接可以执行 #{} 动态传参方式也可以
重点 : 无法在sql中使用 ${}
和<if>
,<where>
标签 ,因为MyBatis 仅仅解析一次 ${}
sqlSourceParser.parse(context.getSql(), parameterType, context.getBindings());
此方法为解析 #{ } 动态参数的方法