case 1) HashMap 형태


public void insertIntoImg(List<NeliVO> neliVoList) {

HashMap<String, Object> param = new HashMap<String, Object>();

param.put("List", neliVoList);

getSqlMapClientTemplate().insert(NAMESPACE  + "insertIntoImg", param);

}



<insert id="insertIntoImg" parameterClass="java.util.HashMap">

INSERT INTO ADMINIMG (

BOARD_SEQ

, CONTENTS_PATH

, CONTENTS_NAME

, CONTENTS_ORI_NAME

, CONTENTS_TYPE

, TEXT1

, REG_DATE

<dynamic>

<iterate prepend="VALUES" conjunction=", " property="List">

#List[].seqId# 

, #List[].path#

, #List[].fileName#

, #List[].oriFileName#

, #List[].contentsType#

, #List[].text1#

, now()

)

</iterate>

</dynamic>

</insert>





case 1) List 형태


public void insertIntoImg(List<NeliVO> neliVoList) {
getSqlMapClientTemplate().insert(NAMESPACE  + "insertIntoImg", neliVoList);
}


<insert id="insertIntoImg" parameterClass="java.util.List">

INSERT INTO ADMINIMG (

BOARD_SEQ

, CONTENTS_PATH

, CONTENTS_NAME

, CONTENTS_ORI_NAME

, CONTENTS_TYPE

, TEXT1

, REG_DATE

)  VALUES

<iterate conjunction=", ">

#[].seqId# 

, #List[].path#

, #List[].fileName#

, #List[].oriFileName#

, #List[].contentsType#

, #List[].text1#

, now()

)

</iterate>

</insert>

+ Recent posts