select * from fs where id=#id# 试试或者
<select id="getFById" parameterClass="String" resutlMap="frResult">
<![CDATA[
select * from fs where id=#value#
]]>
</select>
<select id="getFById" parameterClass="String" resutlMap="frResult">
<![CDATA[
select * from fs where id=#value#
]]>
</select>
解决方案 »
- window.open(url)的时候服务器发生错误!
- 关于Hibernate函数问题,高手来看看!
- spring hibernate 有关delete的问题 大家帮忙
- jboss部署war包的问题
- ibates和sping的事务问题
- 请求,经验,用xml实现企业间的数据交换。如帮我解决,送上所有可用分!
- servlet 运行出错了,怎么解决啊?? 各位老大!
- 这个两个对象该如何判断相同?
- 关于apache+tomcat集群的问题
- 在个人电脑(PC)上,可以学习基于J2EE的开发吗?
- 急!在线等,axis2中如何为某个服务自定义一个Handler
- wsdl2java 生成JAVA文件 出现"you may have mapped two namespaces with elements of the same name"的错误,请问有遇到过此类问题的兄弟吗?
public class Friend implements Serializable{
private int id;
private int uId;//
private int fId;//
//
public Friend(int uId,int fId){
this.uId = uId;
this.fId = fId;
}
//
public Friend(){
}
//getters and setters
public void setId(int id){
this.id = id;
}
public int getId(){
return this.id;
}
public void setUId(int uId){
this.uId = uId;
}
public int getUId(){
return this.uId;
}
public void setFId(int fId){
this.fId = fId;
}
public int getFId(){
return this.fId;
}
} try {
reader = Resources.getResourceAsReader ("sqlmap_cfg.xml");
sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader);
reader.close();
} catch (IOException e) {
e.printStackTrace();
}
try {
Object obj = sqlMap.queryForObject("getFById",4);
if (obj == null) {
System.out.println("obj = null");
} else {
Friend f = (Friend) obj;
System.out.println(f.getUserId());
}
} catch (SQLException e){
e.printStackTrace();
}输出 obj = null