ibatis list에 map을 담아서 넘겼을 때 iterate ( foreach / 반복 / 루프 ) 방법


ibatis list에 map을 담아서 넘겼을 때 iterate ( foreach / 반복 / 루프 ) 방법

1. java List<Map<String, String>> list = new ArrayList<Map<String, String>>(); Map<String, String> tmp = new HashMap<String, String>(); tmp.put("code1", "A"); tmp.put("desc1", "A"); list.add(tmp); tmp = null; tmp = new HashMap<String, String>(); tmp.put("code1", "B"); tmp.put("desc1", "B"); list.add(tmp); Map<String, Object> param = new HashMap<String, Object>(); param.put("codeList", list); 2. ibatis ( xml ) SELECT <isNotEmpty property="cardList"> <iterate property="cardList"> user_id AS "$card...



원문링크 : ibatis list에 map을 담아서 넘겼을 때 iterate ( foreach / 반복 / 루프 ) 방법