Java[spring]调用存储过程
int result = (Integer)getHibernateTemplate().execute(new HibernateCallback(){
public Object doInHibernate(Session session) {
Connection conn=session.connection();
CallStatement smt=conn.prepareCall("{call procename(?,?,?)}");
smt.setInt(1, vo.getId());//设置参数1
smt.setString(2, vo.getCzy());//设置参数2
int getInteger=smt.registerOutParameter(3,Types.INTEGER);
return getInteger;
});
本文出自 “飞沙” 博客
补充:软件开发 , Java ,