Fantastic_Clouds

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: :: 管理 ::

2020年6月13日

摘要: MyBatis常用OGNL表达式如下: e1 or e2 e1 and e2 e1 == e2 或 e1 eq e2 e1 != e2 或 e1 neq e2 e1 lt e2:小于 e1 lte e2:小于等于,其他表示为gt(大于)、gte(大于等于) e1 + e2、e1 * e2、e1 / 阅读全文
posted @ 2020-06-13 21:12 Fantastic_Clouds 阅读(611) 评论(0) 推荐(0) 编辑

摘要: 在JDBC中,根据不同条件拼接SQL时,语句中的空格和逗号很容易出错,且代码很冗长。动态SQL是MyBatis的强大特性之一,可以很容易地规避这些问题。 MyBatis支持以下几种动态SQL相关的标签:if、choose(when、otherwise)、trim(where、set)、foreach 阅读全文
posted @ 2020-06-13 17:11 Fantastic_Clouds 阅读(1222) 评论(0) 推荐(1) 编辑