Java 使用Spring框架提供的StoredProcess调用Oracle存储过程
我在org.springframework.jdbc.object.StoredProcedure类中看到一段代码,它似乎使用execute方法调用存储过程。映射作为输入传递到此方法。但是,我没有看到存储过程名或函数名作为输入传递。Spring如何确保执行存储过程中的正确功能Java 使用Spring框架提供的StoredProcess调用Oracle存储过程,java,spring,oracle,stored-procedures,plsql,Java,Spring,Oracle,Stored Procedures,Plsql,我在org.springframework.jdbc.object.StoredProcedure类中看到一段代码,它似乎使用execute方法调用存储过程。映射作为输入传递到此方法。但是,我没有看到存储过程名或函数名作为输入传递。Spring如何确保执行存储过程中的正确功能 map.put(FAULT_CODE, faultCode); map.put(FAULT_MESSAGE, faultMessage); Map result = this.execute(map
map.put(FAULT_CODE, faultCode);
map.put(FAULT_MESSAGE, faultMessage);
Map result = this.execute(map);
org.springframework.jdbc.object.storedProcess
有3个构造函数:
豆子
protected StoredProcedure()
Allow use as a bean.
用于数据源:
protected StoredProcedure(DataSource ds,
String name)
//name - name of the stored procedure in the database
对于创建包装器:
protected StoredProcedure(JdbcTemplate jdbcTemplate,
String name)
//name - name of the stored procedure in the database
在第二种和第三种情况下,在创建时指定存储过程的名称。我想其中之一就是你的案子