This article mainly introduces the method of Mybatis calling Oracle stored procedures. Friends in need can refer to
1: Calling stored procedures without parameters.
Create stored procedure:
Mapper.xml configuration: After testing, other tags (update, insert, select) are also available.
Mapper.java
MapperTest.java test
2: Stored procedure call with parameters:
2.1 Creation of stored procedure:
2.2 Configuration of Mapper.xml :
2.3Mapper.java
##2.4MapperTest.java Test Console output:3: Result set call of stored procedure.
3.1 Create stored procedure: 3.2 Mapper.xml configuration Configuration The resultMap result set field is slightly different in mybatis. At this time, jdbcType is CURSOR and javaType is ResultSet. You can also convert the result into resultMap here, as shown below 3.3 Mapper.java 3.4 MapperTest.java testThe above is the detailed content of Mybatis calls Oracle stored procedure method explained. For more information, please follow other related articles on the PHP Chinese website!