ibatis2.x学习之oracle存储过程调用配置
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <sqlMap namespace="testProcedure"> <parameterMap class="java.util.Map" id="procedureMap"> <!-- 设置存储过程输出参数 --> <parameter property="curr" jdbcType="ORACLECURSOR" javaType="java.sql.ResultSet" mode="OUT" /> </parameterMap> <!-- resultClass设置游标返回数据类型 --> <procedure id="getAllUser" resultClass="org.yhb.ibatisdemo.User" parameterMap="procedureMap"> {call getAllUser(?)} </procedure> </sqlMap>
//调用存储过程代码 List userList = sqlMapClient.queryForList("getAllUser");
create or replace procedure getAllUser(curr_users out sys_refcursor) as begin open curr_users for select * from user; end;
相关推荐
明月清风精进不止 2020-01-14
liuyang000 2019-12-27
dreamhua 2019-12-23
herohope 2019-12-17
zhaojp0 2019-12-14
明月清风精进不止 2019-12-01
li00lee 2016-10-21
dropkai 2010-04-24
zjyzz 2007-08-26
姚强 2011-09-06
dropkai 2012-08-07
yierxiansheng 2012-08-27
Omega 2015-01-11
huanging 2014-11-23
sflsgfs 2014-04-30
seegroung 2013-04-04
cshpanda 2012-06-04