ibatis返回HashMap
resultClass="java.util.HashMap"
需要注意的地方时,HashMap中的属性都是大写的,应该是因为数据库返回时的列明默认都是大写的
<select id="selectDistinctBrand" resultClass="java.util.HashMap" parameterClass="business" cacheModel="oneDayCache">SELECT distinct a.brand_id, a.brand_nameFROM BUSINESS a</select>
java端返回List<HashMap>绑定到前台下拉框
<html-el:select property="cls_id"> <html-el:option value="">请选择品类</html-el:option> <html-el:optionsCollectionname="clsList" label="CLS_NAME" value="CLS_ID" /> </html-el:select>
页:
[1]