마이바티스 동적쿼리1 동적쿼리 foreach문 사용법 업무중에 직면한 문제...ㅎㅎ arrayList를 mybatis에서 동적쿼리로 이용하는 방법에 대해 기록하려합니다. jsp에서 가져온 cateCodeList는 "Y0101,Y0102,Y0103" 이런 String 형태입니다. 이걸 list형태로 보내주기 위해 cateCodeList를 split후 반복문으로 list에 담아줍니다. if(request.getParameter("cateCodeList") != null) { String [] codeList = request.getParameter("cateCodeList").split(","); List cateCodeList = new ArrayList(); if(codeList != null) { for (String str : codeList) { ca.. 2021. 6. 19. 이전 1 다음