mybatis判断集合为空或者元素个数为零: <if test="mlhs != null and mlhs.size() != 0"> and t.mlh_name not in <foreach collection="mlhs" item="item1" open="(" close=")" index="i" separator=",">
使用mybatis框架在写sql的时候碰到一个异常: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 类似于sql这样出现的异常 SELECT * FROM eval_question WHERE id not in() 后来就查询前先判
package com.lanxi.demo2; import java.util.HashSet; import java.util.Iterator; import java.util.Set; public class Test { public static void main(String[] args) { //引用一个Set集合实现类 Set set=new HashSet(); //添加单个元素 set.add("哈"); set.add("士");