728x90
select *
from TB_TEST
where STATUS in
<iterate property="statusArray" open="(" close=")" conjunction=",">
#statusArray[]#
</iterate>
📍 중요 포인트 ?
- <iterate>
- #statusArray[]#
- <iterate> 에는 "List", "Array" 모두 가능하다는 점.
❗ 참고
- 그렇다면 Mybatis 에서는 어떻게 쓰나?
- <foreach collection="testList" item="test" separator="," open="(" close=")" > #{test} </foreach>
- 물론 MyBatis에서도 "List", "Array" 모두 가능함.
출처 :
https://hee-kkk.tistory.com/41
https://ddolcat.tistory.com/241
https://insight-bgh.tistory.com/169
https://kkh0977.tistory.com/1035
개발 공부를 위한 블로그 입니다.
오류가 있다면 댓글로 알려주세요!
감사합니다.

728x90
'스프링' 카테고리의 다른 글
[자바버전] java 버전 안 바뀜.. (0) | 2023.09.20 |
---|---|
[Spring] Only a type can be imported. com.oreilly.servlet.MultipartRequest resolves to a package (0) | 2023.07.06 |
[Spring] @ModelAttribute로 List 객체에 바인딩 (0) | 2023.04.20 |
[Spring] @RequestBody (0) | 2023.04.17 |
[iBatis] parameterClass = "Map" (∵ 파라미터가 여러 개 일 때!) (0) | 2023.04.04 |