<select id="selectAaboo" resultType="hashmap" parameterType="hashmap"> SELECT name, age FROM AABOO WHERE age = #{age} <if test="jobList!=null and jobList.size!=0"> AND job IN <foreach collection="jobList" item="item" index="index" open="(" close=")" separator=","> #{item} </foreach> </if> </select> 5번 라인 : jobList.size!=0 7번 라인 : - collection : ArrayList 형 - item : ArrayList의 index 순서에 있는 데이터 - index : ArrayList의 … 계속 읽기 myBatis foreach와 list.size