1.对应图片资源这张表创建对应的实体类
Ibatisblob.java
private byte[] picresult;
public byte[] getPicresult() {
return picresult;
}
public void setPicresult(byte[] picresult) {
this.picresult = picresult;
}
2.Dao层中的Dao.java和对应的映射文件sqlmap.xml
Dao.java
public List pic(Map map) {
return this.getSqlMapClientTemplate().queryForList("pic",map);
}
sqlmap.xml
<sqlMap namespace="**" >
<typeAlias alias="ibatisblob" type="cn.**.dao.IbatisBlob" />
<select id="pic" parameterClass="java.ut